| | |
| | | <el-row> |
| | | <el-col :span="5"> |
| | | <el-form-item label="案例姓名" prop="name"> |
| | | <el-input v-model="form.name" placeholder="请输入姓名" :disabled="true" /> |
| | | <el-input |
| | | v-model="form.name" |
| | | placeholder="请输入姓名" |
| | | :disabled="true" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="性别" prop="sex"> |
| | | <el-select v-model="form.sex" placeholder="请输入性别"> |
| | | <el-option v-for="dict in dict.type.sys_user_sex" :key="dict.label" :label="dict.label" |
| | | :value="parseInt(dict.value)"></el-option> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_user_sex" |
| | | :key="dict.label" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="出生年月" prop="borthdate"> |
| | | <el-date-picker clearable size="small" v-model="form.borthdate" type="date" value-format="yyyy-MM-dd" |
| | | placeholder="选择出生年月"> |
| | | <el-date-picker |
| | | clearable |
| | | size="small" |
| | | v-model="form.borthdate" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | placeholder="选择出生年月" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row><el-row><el-col :span="10"><el-form-item label="案例编号" prop="donateno"> |
| | | <el-input v-model="form.donateno" placeholder="请输入案例编号" :disabled="true" /> |
| | | </el-col> </el-row |
| | | ><el-row |
| | | ><el-col :span="10" |
| | | ><el-form-item label="案例编号" prop="donateno"> |
| | | <el-input |
| | | v-model="form.donateno" |
| | | placeholder="请输入案例编号" |
| | | :disabled="true" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="案例时间" prop="donatetime"> |
| | | <el-date-picker clearable size="small" v-model="form.donatetime" type="date" value-format="yyyy-MM-dd" |
| | | placeholder="选择捐献时间"> |
| | | <el-date-picker |
| | | clearable |
| | | size="small" |
| | | v-model="form.donatetime" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | placeholder="选择捐献时间" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="捐献类别" prop="donationcategory"> |
| | | <el-input v-model="form.donationcategory" placeholder="请输入捐献类别" /> |
| | | <el-input |
| | | v-model="form.donationcategory" |
| | | placeholder="请输入捐献类别" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="5"> |
| | | <el-form-item label="应收金额" prop="chargeamount"> |
| | | <el-input v-model="form.chargeamount" placeholder="请输入应收金额" :disabled="true" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="实收金额" prop="chargeamounted"> |
| | | <el-input v-model="form.chargeamounted" placeholder="请输入实收金额" :disabled="true" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input v-model="form.remark" placeholder="请输入备注" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="实收金额" prop="chargeamounted"> |
| | | <el-input |
| | | v-model="form.chargeamounted" |
| | | placeholder="请输入实收金额" |
| | | :disabled="true" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="应收金额" prop="chargeamount"> |
| | | <el-input |
| | | v-model="form.chargeamount" |
| | | placeholder="请输入应收金额" |
| | | :disabled="true" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 10px"> |
| | | <el-table :data="donorchargeorgans" ref="table" border max-height="800" highlight-current-row |
| | | :summary-method="getSummaries" show-summary> |
| | | <el-table-column prop="organno" align="center" label="器官编号" width="90"> |
| | | <el-table |
| | | :data="donorchargeorgans" |
| | | ref="table" |
| | | border |
| | | max-height="800" |
| | | highlight-current-row |
| | | :summary-method="getSummaries" |
| | | show-summary |
| | | > |
| | | <el-table-column |
| | | prop="organno" |
| | | align="center" |
| | | label="器官编号" |
| | | width="90" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.organno" placeholder="器官编号" :disabled="true" /> |
| | | <el-input |
| | | v-model="scope.row.organno" |
| | | placeholder="器官编号" |
| | | :disabled="true" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="organname" align="center" label="器官名称" width="120"> |
| | | <el-table-column |
| | | prop="organname" |
| | | align="center" |
| | | label="器官名称" |
| | | width="120" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.organname" placeholder="器官名称" /> |
| | | <el-input |
| | | v-model="scope.row.organname" |
| | | placeholder="器官名称" |
| | | :disabled="true" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="amount" align="center" label="实收金额" width="150"> |
| | | <el-table-column |
| | | label="系统编号" |
| | | align="center" |
| | | width="120" |
| | | prop="caseno" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.amount" placeholder="实收金额" /> |
| | | <el-input |
| | | v-model="scope.row.caseno" |
| | | placeholder="系统编号" |
| | | :disabled="true" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="amounttime" align="center" label="实收时间" width="200"> |
| | | <el-table-column |
| | | prop="amount" |
| | | align="center" |
| | | label="实收金额" |
| | | width="150" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-date-picker clearable size="small" style="width: 100%" v-model="scope.row.amounttime" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" placeholder="实收时间"> |
| | | </el-date-picker> </template> |
| | | </el-table-column> |
| | | <el-table-column prop="organcharge" align="center" label="标准费用" width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.organcharge" placeholder="标准费用" /> |
| | | <el-input |
| | | v-model="scope.row.amount" |
| | | placeholder="实收金额" |
| | | :disabled="true" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="hospitalname" align="center" label="接收医院" width="280"> |
| | | <el-table-column |
| | | prop="amounttime" |
| | | align="center" |
| | | label="实收时间" |
| | | width="200" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.hospitalname" placeholder="接收医院" /> |
| | | <el-date-picker |
| | | clearable |
| | | :disabled="true" |
| | | size="small" |
| | | style="width: 100%" |
| | | v-model="scope.row.amounttime" |
| | | type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="实收时间" |
| | | > |
| | | </el-date-picker> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="organtime" align="center" label="移植时间" width="200"> |
| | | <el-table-column |
| | | prop="organcharge" |
| | | align="center" |
| | | label="标准费用" |
| | | width="150" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-date-picker clearable size="small" style="width: 100%" v-model="scope.row.organtime" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" placeholder="移植时间"> |
| | | </el-date-picker> </template> |
| | | <el-input |
| | | v-model="scope.row.organcharge" |
| | | placeholder="标准费用" |
| | | :disabled="true" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remark" align="center" label="备注"> |
| | | <el-table-column |
| | | prop="hospitalno" |
| | | align="center" |
| | | label="接收医院" |
| | | width="280" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.remark" placeholder="备注" /> |
| | | <org-selecter |
| | | v-model="scope.row.hospitalno" |
| | | ref="tranHosSelect" |
| | | :org-type="'4'" |
| | | style="width: 100%" |
| | | :disabled="true" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="受体姓氏" |
| | | align="center" |
| | | width="120" |
| | | prop="name" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.name" |
| | | placeholder="受体姓氏" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="organtime" |
| | | align="center" |
| | | label="移植时间" |
| | | width="200" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-date-picker |
| | | clearable |
| | | :disabled="true" |
| | | size="small" |
| | | style="width: 100%" |
| | | v-model="scope.row.organtime" |
| | | type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="移植时间" |
| | | > |
| | | </el-date-picker> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="organchargedesc" align="center" label="备注"> |
| | | <template slot-scope="scope" width="300"> |
| | | <el-input |
| | | v-model="scope.row.organchargedesc" |
| | | placeholder="备注" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-row> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm" v-if="operationType == 'add' || operationType == 'update'">保 |
| | | 存</el-button> |
| | | <el-button type="primary" @click="cancel">关闭</el-button> |
| | | <el-button |
| | | type="success" |
| | | @click="submitForm" |
| | | v-if="operationType == 'add' || operationType == 'update'" |
| | | >保 存</el-button |
| | | > |
| | | <el-button type="info" @click="cancel">关闭</el-button> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-dialog v-dialogDrags :modal="false" :close-on-click-modal="false" :title="pdftitle" :visible.sync="pdfVisible" |
| | | width="60%"> |
| | | <el-tabs style="margin-top: 20px;" v-model="activeName" type="border-card" @tab-click="handleClick"> |
| | | <el-tab-pane label="普通附件" :name="1"> |
| | | <div class="pdfimg"> |
| | | <div class="box-pdf"> |
| | | <div> |
| | | <el-upload size="mini" class="upload-demo" :action="uploadFileUrl" :file-list="fileListto" |
| | | :show-file-list="false" multiple drag :headers="headers" :on-success="(response, file, fileList) => |
| | | uploadSccess(response, file, fileList) |
| | | " :on-preview="downFile" :disabled="operationType == 'detail'" :on-error="handleUploadError" |
| | | :on-remove="remove" accept="image/*,.pdf"> |
| | | <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> |
| | | </el-upload> |
| | | <el-table :data="fileListto" @row-click="downFile" style="width: 100%" height="400"> |
| | | <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.stop="deletedowfile(scope.row)">删除</el-button> |
| | | <el-button type="primary" size="mini" |
| | | @click.native.prevent.stop="moveupdowfile(scope.row)">上移</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | |
| | | <div v-if="this.previewpdf && pdfimgsrcList.length" class="pdfimgmin"> |
| | | <!-- <img :src="pdfimg" /> --> |
| | | <el-image style="width: 95%; height: 90%" :src="pdfimg" :preview-src-list="pdfimgsrcList"> |
| | | <!-- <div slot="error" class="image-slot"> |
| | | <i class="el-icon-picture-outline"></i> |
| | | </div> --> |
| | | </el-image> |
| | | </div> |
| | | <div v-else class="pdfimgmins">{{ hintitle }}</div> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="发票文件" :name="2"> |
| | | <div class="pdfimg"> |
| | | <div class="box-pdf"> |
| | | <div> |
| | | <el-upload size="mini" class="upload-demo" :action="uploadFileUrl" :file-list="invoicefileList" |
| | | :show-file-list="false" multiple drag :headers="headers" :on-success="(response, file, fileList) => |
| | | uploadSccess(response, file, fileList) |
| | | " :on-preview="downFile" :disabled="operationType == 'detail'" :on-error="handleUploadError" |
| | | :on-remove="remove" accept="image/*,.pdf"> |
| | | <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> |
| | | </el-upload> |
| | | <el-table :data="invoicefileListto" @row-click="downFile" style="width: 100%" height="400"> |
| | | <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.stop="deletedowfile(scope.row)">删除</el-button> |
| | | <el-button type="primary" size="mini" |
| | | @click.native.prevent.stop="moveupdowfile(scope.row)">上移</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | |
| | | <div v-if="this.previewpdf && invoicepdfimgsrcList.length" class="pdfimgmin"> |
| | | <el-image style="width: 95%; height: 90%" :src="invoicepdfimg" :preview-src-list="invoicepdfimgsrcList"> |
| | | </el-image> |
| | | </div> |
| | | <div v-else class="pdfimgmins">{{ hintitle }}</div> |
| | | </div> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-dialog> |
| | | <el-dialog title="提示" :visible.sync="Savereminder" width="30%"> |
| | | <el-alert :title="'您已添加' + |
| | | totalquantity + |
| | | '条数据,为防止数据丢失是否提交保存再继续添加。' |
| | | " type="warning"> |
| | | </el-alert> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="unsave">取 消</el-button> |
| | | <el-button type="primary" @click="Savenow">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import Treeselect from "@riophae/vue-treeselect"; |
| | | import "@riophae/vue-treeselect/dist/vue-treeselect.css"; |
| | | import { regionDataPlus, CodeToText } from "element-china-area-data"; |
| | | import { getDonorcharge, addDonorcharge, updateDonorcharge, listDonorchargeorgan, getDonorchargeorgan, delDonorchargeorgan, addDonorchargeorgan, updateDonorchargeorgan, exportDonorchargeorgan } from "@/api/project/donorcharge"; |
| | | import { listDonatebaseinfo } from "@/api/project/donatebaseinfo"; |
| | | import { |
| | | getDonorcharge, |
| | | addDonorcharge, |
| | | updateDonorcharge |
| | | } from "@/api/project/donorcharge"; |
| | | import { |
| | | listDonorchargeorgan, |
| | | delDonorchargeorgan, |
| | | saveDonorchargeorgan |
| | | } from "@/api/project/donorcharge"; |
| | | import { listDonatecomporgan } from "@/api/project/donatecompletioninfo"; |
| | | import { listOrgancharge } from "@/api/project/organcharge"; |
| | | import OrgSelecter from "@/views/project/components/orgselect"; |
| | | import Li_area_select from "@/components/Address"; |
| | | import { getUserProfile } from "@/api/system/user"; |
| | | import { getToken } from "@/utils/auth"; |
| | |
| | | export default { |
| | | components: { |
| | | Treeselect, |
| | | OrgSelecter, |
| | | Li_area_select, |
| | | pdf |
| | | }, |
| | | dicts: [ |
| | | "sys_user_sex", |
| | | "sys_0_1", |
| | | ], |
| | | name: "Donorcharge", |
| | | dicts: ["sys_user_sex", "sys_0_1"], |
| | | name: "Donorchargemanager", |
| | | data() { |
| | | return { |
| | | activeName: 1, //文件类型 |
| | | // 部门树选项 |
| | | |
| | | //票据文件 |
| | | pdftitle: "", |
| | | pdfimg: "", |
| | |
| | | donorchargeorgans: [], |
| | | // 弹出层标题 |
| | | title: "", |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | // 查询费用表参数 |
| | | queryParams: { |
| | | pageNum: 1, |
| | |
| | | name: null, |
| | | donationcategory: null, |
| | | donateorgan: null, |
| | | chargeamounted: null, |
| | | chargeamounted: null |
| | | }, |
| | | // 查询费用器官表参数 |
| | | organParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | donorchargeid: null, |
| | | donorchargeid: null |
| | | }, |
| | | |
| | | // 当前用户信息 |
| | | userprofile: {}, |
| | | // 表单参数 |
| | | form: {}, |
| | | // 列表参数 |
| | | table: {}, |
| | | reimbursementList: [], |
| | | |
| | | // 表单校验 |
| | |
| | | headers: { |
| | | Authorization: "Bearer " + getToken() |
| | | }, |
| | | |
| | | jurisdiction: false, |
| | | |
| | | //保存按钮控制 |
| | |
| | | this.defaultperson = response.data; |
| | | this.standardlevel = response.data.standardlevel; |
| | | }); |
| | | |
| | | |
| | | //获取参数 |
| | | this.getroute(); |
| | | }, |
| | |
| | | this.$refs["table"].doLayout(); |
| | | }); |
| | | }, |
| | | |
| | | |
| | | destroyed() { |
| | | window.removeEventListener("beforeunload", e => this.beforeunloadFn(e)); |
| | | }, //生命周期 - 销毁完成 |
| | |
| | | if ( |
| | | (JSON.stringify(this.form) == sessionStorage.getItem("apiform") && |
| | | JSON.stringify(this.donorchargeorgans) == |
| | | sessionStorage.getItem("apifunddetail")) || |
| | | sessionStorage.getItem("apifunddetail")) || |
| | | !sessionStorage.getItem("apifunddetail") |
| | | ) { |
| | | } else { |
| | |
| | | } |
| | | }, |
| | | |
| | | handleUploadError() { }, |
| | | handleUploadError() {}, |
| | | // 获取请求头 |
| | | Getnetworkheader() { |
| | | let string = window.location.href; |
| | |
| | | this.pdftitle = "共" + this.invoicepdfimgsrcList.length + "项"; |
| | | } |
| | | }, |
| | | remove(file, fileList) { |
| | | const donorchargeorgans = [...this.donorchargeorgans]; |
| | | if (this.activeName == 1) { |
| | | this.fileListto.splice(this.fileListto.indexOf(file), 1); |
| | | donorchargeorgans[this.atpresent].annexfilesList = this.fileListto; |
| | | } else { |
| | | this.invoicefileListto.splice(this.invoicefileListto.indexOf(file), 1); |
| | | donorchargeorgans[this.atpresent].invoicefilesList = this.invoicefileListto; |
| | | } |
| | | }, |
| | | |
| | | handleExceed() { |
| | | this.$message.error(`上传文件数量不能超过 ${5} 个!`); |
| | | }, |
| | | |
| | | //文件上传成功回调 |
| | | uploadSccess(response, file, fileList) { |
| | | this.donorchargeorgans; |
| | | //获取票据信息位置 |
| | | if (this.activeName == 1) { |
| | | if (response.code == 200) { |
| | | // this.form.filename = file.raw.name; |
| | | this.previewpdf = true; |
| | | this.$modal.msgSuccess(response.msg); |
| | | this.fileListto.push({ |
| | | name: file.name, |
| | | url: response.fileName |
| | | }); |
| | | this.pdfimgsrcList.push( |
| | | this.Networkheader + "/prod-api" + response.fileName |
| | | ); |
| | | |
| | | this.pdftitle = "共" + this.pdfimgsrcList.length + "项"; |
| | | this.pdfimg = this.Networkheader + "/prod-api" + response.fileName; |
| | | this.donorchargeorgans[this.atpresent].annexfilesList = this.fileListto; |
| | | } else { |
| | | console.log(response.msg); |
| | | } |
| | | } else { |
| | | if (response.code == 200) { |
| | | // this.form.filename = file.raw.name; |
| | | this.previewpdf = true; |
| | | this.$modal.msgSuccess(response.msg); |
| | | this.invoicefileListto.push({ |
| | | name: file.name, |
| | | url: response.fileName |
| | | }); |
| | | this.invoicepdfimgsrcList.push( |
| | | this.Networkheader + "/prod-api" + response.fileName |
| | | ); |
| | | |
| | | this.pdftitle = "共" + this.invoicepdfimgsrcList.length + "项"; |
| | | this.pdfimg = this.Networkheader + "/prod-api" + response.fileName; |
| | | this.donorchargeorgans[ |
| | | this.atpresent |
| | | ].invoicefilesList = this.invoicefileListto; |
| | | } else { |
| | | console.log(response.msg); |
| | | } |
| | | } |
| | | }, |
| | | // 点击票据 |
| | | Filepopup(index, rows, row) { |
| | | this.tableDatatop = []; |
| | | this.pdfimgsrcList = []; |
| | | this.invoDatatop = []; |
| | | this.invoicepdfimgsrcList = []; |
| | | this.invoDatatop.push(row); |
| | | this.tableDatatop.push(row); |
| | | this.atpresent = index; |
| | | this.pdfVisible = true; |
| | | |
| | | |
| | | if (this.donorchargeorgans[index].annexfilesList) { |
| | | this.previewpdf = true; |
| | | this.fileListto = this.donorchargeorgans[index].annexfilesList; |
| | | this.pdfimg = this.Networkheader + "/prod-api" + this.fileListto[0].url; |
| | | this.fileListto.forEach(item => { |
| | | this.pdfimgsrcList.push(this.Networkheader + "/prod-api" + item.url); |
| | | }); |
| | | } else { |
| | | this.fileListto = []; |
| | | this.pdfimg = ""; |
| | | this.pdftitle = ""; |
| | | } |
| | | // -发票文件 |
| | | if (this.donorchargeorgans[index].invoicefilesList) { |
| | | this.previewpdf = true; |
| | | this.invoicefileListto = this.donorchargeorgans[index].invoicefilesList; |
| | | this.invoicepdfimg = |
| | | this.Networkheader + "/prod-api" + this.invoicefileListto[0].url; |
| | | this.invoicefileListto.forEach(item => { |
| | | this.invoicepdfimgsrcList.push( |
| | | this.Networkheader + "/prod-api" + item.url |
| | | ); |
| | | }); |
| | | |
| | | } else { |
| | | this.invoicefileListto = []; |
| | | this.invoicepdfimg = ""; |
| | | this.pdftitle = ""; |
| | | } |
| | | |
| | | if (this.activeName == 1) { |
| | | this.pdftitle = "共" + this.pdfimgsrcList.length + "项"; |
| | | } else { |
| | | this.pdftitle = "共" + this.invoicepdfimgsrcList.length + "项"; |
| | | } |
| | | }, |
| | | |
| | | // 点击已上传文件 |
| | | downFile(item) { |
| | | if (this.activeName == 1) { |
| | | this.pdftitle = |
| | | "共" + this.pdfimgsrcList.length + "项,当前选中" + item.name; |
| | | let name = item.name.split("."); |
| | | if (name[1] == "pdf") { |
| | | this.$modal.msgWarning("当前文件暂不支持预览"); |
| | | this.previewpdf = false; |
| | | this.hintitle = "当前文件暂不支持预览"; |
| | | } else if (name[1] == "jpg" || "png") { |
| | | this.previewpdf = true; |
| | | if (item.url) { |
| | | this.pdfimg = this.Networkheader + "/prod-api" + item.url; |
| | | } else { |
| | | this.pdfimg = this.Networkheader + "/prod-api" + item.response.url; |
| | | } |
| | | } else { |
| | | this.hintitle = "当前文件暂不支持预览"; |
| | | this.$modal.msgWarning("当前文件暂不支持预览"); |
| | | this.previewpdf = false; |
| | | } |
| | | } else { |
| | | console.log(item, "点击文件拿item"); |
| | | this.pdftitle = |
| | | "共" + this.invoicepdfimgsrcList.length + "项,当前选中" + item.name; |
| | | let name = item.name.split("."); |
| | | if (name[1] == "pdf") { |
| | | this.$modal.msgWarning("当前文件暂不支持预览"); |
| | | this.previewpdf = false; |
| | | this.hintitle = "当前文件暂不支持预览"; |
| | | } else if (name[1] == "jpg" || "png") { |
| | | this.previewpdf = true; |
| | | if (item.url) { |
| | | this.invoicepdfimg = this.Networkheader + "/prod-api" + item.url; |
| | | } else { |
| | | this.invoicepdfimg = |
| | | this.Networkheader + "/prod-api" + item.response.url; |
| | | } |
| | | } else { |
| | | this.hintitle = "当前文件暂不支持预览"; |
| | | this.$modal.msgWarning("当前文件暂不支持预览"); |
| | | this.previewpdf = false; |
| | | } |
| | | } |
| | | }, |
| | | getIndexInArray(arr, obj) { |
| | | return arr.indexOf(obj); |
| | | }, |
| | | // 点击删除 |
| | | deletedowfile(row) { |
| | | if (this.activeName == 1) { |
| | | const indexlist = this.getIndexInArray( |
| | | this.pdfimgsrcList, |
| | | this.Networkheader + "/prod-api" + row.url |
| | | ); |
| | | this.pdfimgsrcList.splice(indexlist, 1); |
| | | const index = this.getIndexInArray(this.fileListto, row); |
| | | this.fileListto.splice(index, 1); |
| | | } else { |
| | | const indexlist = this.getIndexInArray( |
| | | this.invoicepdfimgsrcList, |
| | | this.Networkheader + "/prod-api" + row.url |
| | | ); |
| | | this.invoicepdfimgsrcList.splice(indexlist, 1); |
| | | const index = this.getIndexInArray(this.invoicefileListto, row); |
| | | this.invoicefileListto.splice(index, 1); |
| | | } |
| | | }, |
| | | // 点击上移 |
| | | moveupdowfile(row) { |
| | | if (this.activeName == 1) { |
| | | const index = this.getIndexInArray(this.fileListto, row); |
| | | const item = this.fileListto.splice(index, 1)[0]; // 移除指定索引处的元素,并保存到item变量中 |
| | | this.fileListto.splice(index - 1, 0, item); // 将item插入到索引位置的前一位 |
| | | } else { |
| | | const index = this.getIndexInArray(this.invoicefileListto, row); |
| | | const item = this.invoicefileListto.splice(index, 1)[0]; // 移除指定索引处的元素,并保存到item变量中 |
| | | this.invoicefileListto.splice(index - 1, 0, item); // 将item插入到索引位置的前一位 |
| | | } |
| | | }, |
| | | |
| | | // 表单重置 |
| | |
| | | this.operationType = this.$route.query.operation; |
| | | this.curId = this.$route.query.id; |
| | | this.curCase = this.$route.query.data; |
| | | console.log("this.$route.query",this.$route.query); |
| | | console.log("this.$route.query", this.$route.query); |
| | | |
| | | if (this.operationType == "add") { |
| | | this.title = "新建案例器官费用表"; |
| | | this.handleAdd(); |
| | | console.log("1") |
| | | |
| | | console.log("1"); |
| | | } else if (this.operationType == "update") { |
| | | this.title = "修改案例器官费用表"; |
| | | this.handleUpdate(); |
| | | console.log("2") |
| | | |
| | | console.log("2"); |
| | | } else if (this.operationType == "detail") { |
| | | this.title = "查看案例器官费用表"; |
| | | this.handleDetail(); |
| | | console.log("3") |
| | | console.log("3"); |
| | | } |
| | | }, |
| | | |
| | |
| | | |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | this.single = selection.length !== 1 |
| | | this.multiple = !selection.length |
| | | this.ids = selection.map(item => item.id); |
| | | this.single = selection.length !== 1; |
| | | this.multiple = !selection.length; |
| | | }, |
| | | |
| | | /** 新增按钮操作 */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.title = "新增捐献案例器官费用表"; |
| | | |
| | | if (this.curCase) { |
| | |
| | | this.form.donationcategory = this.curCase.donationcategory; |
| | | |
| | | //获取完成登记的器官表 |
| | | if (this.curCase.id > 0) { } |
| | | else { this.curCase.id = 0 } |
| | | if (this.curCase.id > 0) { |
| | | } else { |
| | | this.curCase.id = 0; |
| | | } |
| | | let searchParam = { |
| | | infoid: this.curCase.id |
| | | }; |
| | |
| | | if (res1.code == 200) { |
| | | this.organchargelist = res1.rows; |
| | | } |
| | | |
| | | //插入器官表 |
| | | res.rows.forEach(item => { |
| | | //获取费用金额 |
| | |
| | | if (rescharge.organcode == item.organno) { |
| | | this.donorchargeorgans.push({ |
| | | organno: item.organno, |
| | | caseno: item.caseno, |
| | | organname: item.organname, |
| | | organcharge: rescharge.charge, |
| | | infoid: item.infoid, |
| | | hospitalname: item.transplanthospitalname, |
| | | hospitalno: item.transplanthospitalno, |
| | | hospitalname: item.hospitalname, |
| | | hospitalno: item.hospitalno, |
| | | organtime: item.transplanttime, |
| | | chargestate: '0' |
| | | chargestate: "0" |
| | | }); |
| | | } |
| | | }); |
| | |
| | | /** 修改按钮操作 */ |
| | | handleUpdate() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.title = "修改捐献案例器官费用表"; |
| | | |
| | | getDonorcharge(this.curId).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "修改捐献案例器官费用表"; |
| | | |
| | | console.log("getDonorcharge", response); |
| | | //器官费用信息 |
| | | this.organParams.donorchargeid = this.curId; |
| | | console.log("this.organParams", this.organParams); |
| | | listDonorchargeorgan(this.organParams).then(res => { |
| | | console.log("listDonorchargeorgan", res); |
| | | this.donorchargeorgans = res.rows; |
| | | console.log(this.donorchargeorgans, "donorchargeorgans"); |
| | | if (this.donorchargeorgans.length > 0) { |
| | | } else { |
| | | this.addRow(0); |
| | |
| | | /** 修改查看操作 */ |
| | | handleDetail() { |
| | | this.reset(); |
| | | this.open = true; |
| | | |
| | | getDonorcharge(this.curId).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "查看捐献案例器官费用表"; |
| | | |
| | | //器官费用信息 |
| | |
| | | }, |
| | | |
| | | /** 提交保存按钮 */ |
| | | submitForm: debounce(function (data) { |
| | | submitForm: debounce(function(data) { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | | updateDonorcharge(this.form).then(response => { |
| | | if (response.code == 200) { |
| | | this.$modal.msgSuccess("保存成功!"); |
| | | //校验、费用合计 |
| | | let ChargeSum = 0; |
| | | let ChargeamountSum = 0; |
| | | let organname = ""; |
| | | |
| | | try { |
| | | for (let i = 0; i < this.donorchargeorgans.length; i++) { |
| | | organname += this.donorchargeorgans[i].organname + ","; |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].organcharge))) { |
| | | ChargeSum += parseFloat(this.donorchargeorgans[i].organcharge); |
| | | } |
| | | this.open = false; |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].amount))) { |
| | | ChargeamountSum += parseFloat(this.donorchargeorgans[i].amount); |
| | | } |
| | | } |
| | | this.form.donateorgan = organname.substring( |
| | | 0, |
| | | organname.lastIndexOf(",") |
| | | ); |
| | | this.form.chargeamount = ChargeSum.toFixed(2); |
| | | this.form.chargeamounted = ChargeamountSum.toFixed(2); |
| | | } catch {} |
| | | |
| | | //保存 |
| | | if (this.form.id != null) { |
| | | for (let k = 0; k < this.donorchargeorgans.length; k++) { |
| | | this.donorchargeorgans[k].donorchargeID = this.form.id; |
| | | } |
| | | updateDonorcharge(this.form).then(res1 => { |
| | | if (res1.code == 200) { |
| | | saveDonorchargeorgan(this.donorchargeorgans).then(res2 => { |
| | | if (res2.code == 200) { |
| | | this.$modal.msgSuccess("保存成功!"); |
| | | this.$router.go(-1); |
| | | |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } else { |
| | | addDonorcharge(this.form).then(response => { |
| | | if (response.code == 200) { |
| | | console.log(response); |
| | | this.$modal.msgSuccess("保存成功!"); |
| | | console.log("addDonorcharge", response); |
| | | //保存前校验数据 |
| | | for (let k = 0; k < this.donorchargeorgans.length; k++) { |
| | | this.donorchargeorgans[k].donorchargeid = response.data.id; |
| | | } |
| | | saveDonorchargeorgan(this.donorchargeorgans).then(res2 => { |
| | | if (res2.code == 200) { |
| | | this.$modal.msgSuccess("保存成功!"); |
| | | this.$router.go(-1); |
| | | |
| | | } |
| | | }); |
| | | } |
| | | this.open = false; |
| | | }); |
| | | } |
| | | } |
| | |
| | | }, 500), |
| | | |
| | | //计算费用合计 |
| | | sumTotalFee() { |
| | | let allSum = 0; |
| | | chargeSum() { |
| | | let ChargeSum = 0; |
| | | let ChargeamountSum = 0; |
| | | |
| | | //捐献者家属费用 |
| | | if (!isNaN(parseFloat(this.form.donoramount))) { |
| | | allSum += parseFloat(this.form.donoramount); |
| | | } |
| | | |
| | | //报销明细费用 |
| | | //费用合计 |
| | | try { |
| | | for (let i = 0; i < this.donorchargeorgans.length; i++) { |
| | | /* |
| | | let totalFee = 0; |
| | | //计算当前报销内容费用合计 |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].total))) { |
| | | totalFee += parseFloat(this.donorchargeorgans[i].total); |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].organcharge))) { |
| | | ChargeSum += parseFloat(this.donorchargeorgans[i].organcharge); |
| | | } |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].cityfee))) { |
| | | totalFee += parseFloat(this.donorchargeorgans[i].cityfee); |
| | | } |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].hotelexpense))) { |
| | | totalFee += parseFloat(this.donorchargeorgans[i].hotelexpense); |
| | | } |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].otherexpense))) { |
| | | totalFee += parseFloat(this.donorchargeorgans[i].otherexpense); |
| | | } |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].foodexpenses))) { |
| | | totalFee += parseFloat(this.donorchargeorgans[i].foodexpenses); |
| | | } |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].foodallowance))) { |
| | | totalFee += parseFloat(this.donorchargeorgans[i].foodallowance); |
| | | } |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].otherfeeamount))) { |
| | | totalFee += parseFloat(this.donorchargeorgans[i].otherfeeamount); |
| | | } |
| | | this.donorchargeorgans[i].total = parseFloat(totalFee).toFixed(2); |
| | | this.$set(this.donorchargeorgans, i, this.donorchargeorgans[i]); |
| | | */ |
| | | |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].total))) { |
| | | allSum += parseFloat(this.donorchargeorgans[i].total); |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].amount))) { |
| | | ChargeamountSum += parseFloat(this.donorchargeorgans[i].amount); |
| | | } |
| | | } |
| | | |
| | | this.form.amountrequested = allSum.toFixed(2); |
| | | } catch { } |
| | | this.form.chargeamount = ChargeSum.toFixed(2); |
| | | this.form.chargeamounted = ChargeamountSum.toFixed(2); |
| | | } catch {} |
| | | }, |
| | | |
| | | //表格合计 |
| | | getSummaries(param) { |
| | | const { columns, data } = param; |
| | | const sums = []; |
| | | var columnnames = ["organno", "organname", "amount", "amounttime", "organcharge", "hospitalname", "organtime", "remark"]; |
| | | var columnnames = [ |
| | | "organno", |
| | | "organname", |
| | | "caseno", |
| | | "amounttime", |
| | | "name", |
| | | "hospitalname", |
| | | "organtime", |
| | | "remark", |
| | | 'organchargedesc' |
| | | ]; |
| | | columns.forEach((column, index) => { |
| | | if (index === 0) { |
| | | sums[index] = "合计"; |
| | |
| | | // if (index === 2) { |
| | | // sums[index] = this.form.chargeamounted; |
| | | // return; |
| | | // } |
| | | // } |
| | | // if (index === 4) { |
| | | // sums[index] = this.form.chargeamount; |
| | | // return; |
| | |
| | | text-align: center; |
| | | } |
| | | } |
| | | ::v-deep .el-input.is-disabled .el-input__inner { |
| | | background-color: #F5F7FA; |
| | | border-color: #dfe4ed; |
| | | color: #000000; |
| | | cursor: not-allowed; |
| | | } |
| | | |
| | | ::v-deep .el-input--medium .el-input__inner { |
| | | height: 36px; |