| | |
| | | }}</el-radio> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <!-- <el-col :span="5"> |
| | | <el-form-item label="银行名称" prop="bankname"> |
| | | <el-input v-model="form.bankname" placeholder="请输入银行名称" /> |
| | | </el-form-item> </el-col |
| | |
| | | placeholder="请输入银行账号" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-col> --> |
| | | <el-col :span="5"> |
| | | <el-form-item label="联系电话" prop="phone"> |
| | | <el-input v-model="form.phone" placeholder="请输入联系电话" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="捐献者" prop="name"> |
| | | <el-input |
| | | :disabled="true" |
| | | v-model="form.donorname" |
| | | placeholder="请输入捐献者姓名" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="申请金额" prop="pretaxcost"> |
| | | <el-input |
| | | v-model="form.pretaxcost" |
| | | placeholder="税前金额合计" |
| | | :disabled="true" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | --> |
| | | <el-col :span="5"> |
| | | <el-form-item label="申请金额" prop="pretaxcost"> |
| | | <el-input |
| | | v-model="form.pretaxcost" |
| | | placeholder="税前金额合计" |
| | | :disabled="true" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <!-- |
| | | <el-col :span="5"> |
| | | <el-form-item label="应缴税" prop="taxcost" v-if="businessType == '1' || businessType == '2'"> |
| | |
| | | <el-input v-model="form.remark" placeholder="申请说明" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="捐献者" prop="name"> |
| | | <el-input |
| | | :disabled="true" |
| | | v-model="form.donorname" |
| | | placeholder="请输入捐献者姓名" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <!-- |
| | | <el-col :span="5"> |
| | | <el-form-item label="申请状态" prop="recordstatus"> |
| | |
| | | </el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row v-if="jurisdiction"> |
| | | <el-alert |
| | | title="当前为查看状态,不支持修改存储。" |
| | | type="warning" |
| | | show-icon |
| | | > |
| | | </el-alert> |
| | | </el-row> |
| | | <el-row v-if="businessType == 2"> |
| | | <div style="margin-bottom: 15px;"> |
| | | <el-button |
| | | type="success" |
| | | icon="el-icon-download" |
| | | @click="Batchentry" |
| | | >批量录入</el-button |
| | | > |
| | | </div> |
| | | </el-row> |
| | | <el-row> |
| | | <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="序号" /> |
| | |
| | | placeholder="服务说明" |
| | | clearable |
| | | allow-create |
| | | filterable |
| | | @change="verifyFeeRemark(scope.row)" |
| | | > |
| | | <el-option |
| | |
| | | :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> |
| | |
| | | align="center" |
| | | label="单位名称" |
| | | width="250" |
| | | v-if="form.applytype != '4'" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | |
| | | plain |
| | | @click="ShowDetailDialog(scope, 'unit')" |
| | | >{{ scope.row.unitname }}</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="unitno" |
| | | align="center" |
| | | label="单位/个人" |
| | | width="250" |
| | | v-if="form.applytype == '4'" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | @click="ShowDetailDialog(scope, 'expert')" |
| | | >{{ scope.row.beneficiaryname }}</el-button |
| | | > |
| | | <!-- <el-select |
| | | v-model="scope.row.unitno" |
| | |
| | | align="center" |
| | | label="开户银行" |
| | | width="200" |
| | | v-if="form.applytype != '4'" |
| | | > |
| | | <!-- v-if="form.applytype != '4'" --> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.depositbank" |
| | |
| | | align="center" |
| | | label="银行帐号" |
| | | width="210" |
| | | v-if="form.applytype != '4'" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remark" align="center" label="备注"> |
| | | <el-table-column |
| | | prop="remark" |
| | | align="center" |
| | | width="330" |
| | | label="备注" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.remark" placeholder="备注" /> |
| | | <el-input |
| | | type="textarea" |
| | | :rows="2" |
| | | v-model="scope.row.remark" |
| | | placeholder="备注" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | type="text" |
| | | size="mini" |
| | | @click="addRow(scope.$index)" |
| | | v-if="operationType == 'add' || operationType == 'update'" |
| | | v-if=" |
| | | operationType == 'add' || |
| | | operationType == 'update' || |
| | | operationType == 'check' |
| | | " |
| | | >新增</el-button |
| | | > |
| | | <el-button |
| | |
| | | " |
| | | type="text" |
| | | size="small" |
| | | v-if="operationType == 'add' || operationType == 'update'" |
| | | v-if=" |
| | | operationType == 'add' || |
| | | operationType == 'update' || |
| | | operationType == 'check' |
| | | " |
| | | > |
| | | 删除 |
| | | </el-button> |
| | |
| | | size="mini" |
| | | class="upload-demo" |
| | | :action="uploadFileUrl" |
| | | :file-list="fileList" |
| | | :file-list="fileListto" |
| | | :show-file-list="false" |
| | | multiple |
| | | :limit="20" |
| | | drag |
| | | :headers="headers" |
| | | :on-success=" |
| | | (response, file, fileList) => |
| | |
| | | :on-preview="downFile" |
| | | :disabled="operationType == 'detail'" |
| | | :on-error="handleUploadError" |
| | | :on-exceed="handleExceed" |
| | | :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> |
| | | </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> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row v-if="operationType == 'detail' || operationType == 'check'"> |
| | | <el-row |
| | | v-if=" |
| | | operationType == 'detail' || |
| | | operationType == 'check' || |
| | | operationType == 'update' |
| | | " |
| | | > |
| | | <el-table :data="fundflowList" border> |
| | | <el-table-column |
| | | label="审核日期" |
| | |
| | | <el-button |
| | | type="primary" |
| | | @click="submitForm" |
| | | v-if="operationType == 'add' || operationType == 'update'" |
| | | v-if=" |
| | | operationType == 'add' || |
| | | operationType == 'update' || |
| | | ismanager == true |
| | | " |
| | | >提交保存</el-button |
| | | > |
| | | <el-button |
| | |
| | | <el-dialog |
| | | :visible.sync="showSelectionDialog" |
| | | :close-on-click-modal="false" |
| | | :title="'单位/专家信息选择'" |
| | | :title="'单位/个人信息选择'" |
| | | width="500px" |
| | | style="text-align: center" |
| | | v-loading="loading" |
| | | > |
| | | <el-form ref="funddetailForm" :model="funddetailForm"> |
| | | <el-row> |
| | | <el-col :span="24" v-if="selectionType == 'expert'"> |
| | | <el-row v-if="businessType != 4"> |
| | | <el-col |
| | | :span="24" |
| | | v-if="selectionType == 'expert' && businessType != 4" |
| | | > |
| | | <el-form-item label="请选择专家信息:" prop="expertfrom"> |
| | | <el-radio-group v-model="expertfrom" style="margin-bottom: 0"> |
| | | <el-radio label="1">专家库</el-radio> |
| | |
| | | label="发票单位名称" |
| | | prop="unitno" |
| | | label-width="120px" |
| | | v-if="businessType == 3 || businessType == 4" |
| | | v-if="businessType == 3" |
| | | > |
| | | <el-select |
| | | v-model="funddetailForm.unitno" |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | |
| | | <el-row v-if="businessType == 4"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="请选择专家信息:" prop="experthear"> |
| | | <el-radio-group |
| | | @change="ShowDetailDialog(spocewl)" |
| | | v-model="experthear" |
| | | style="margin-bottom: 0" |
| | | > |
| | | <el-radio label="unit">人员选项</el-radio> |
| | | <el-radio label="expert">单位选项</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24" v-if="experthear == 'unit'"> |
| | | <el-form-item |
| | | label="人员姓名" |
| | | prop="beneficiaryname" |
| | | label-width="80px" |
| | | > |
| | | <el-select |
| | | filterable |
| | | allow-create |
| | | ref="beneficiaryname" |
| | | default-first-option |
| | | @change="bbaaccss" |
| | | v-model="Personnelforname" |
| | | placeholder="请选择" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in expertlist" |
| | | :key="item.expertNo" |
| | | :label="item.exportName" |
| | | :value="item.exportName" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24" v-if="experthear == 'expert'"> |
| | | <el-form-item label="单位名称" prop="unitno" label-width="120px"> |
| | | <el-select |
| | | v-model="unitforname" |
| | | placeholder="单位名称" |
| | | @change="bbaaccss" |
| | | clearable |
| | | filterable |
| | | allow-create |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="(spec, index) in unitList" |
| | | :key="index" |
| | | :label="spec.organizationname" |
| | | :value="spec.organizationname" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row v-if="businessType != 4"> |
| | | <el-col :span="12" v-if="expertfrom == '2'"> |
| | | <el-form-item label="专家姓名" prop="expertname" label-width="80px"> |
| | | <el-input |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-row v-if="businessType != 4"> |
| | | <el-col :span="24" v-if="expertfrom == '2'"> |
| | | <el-form-item |
| | | label="身份证号" |
| | |
| | | </el-col> |
| | | </el-row> |
| | | --> |
| | | <el-row> |
| | | <el-row v-if="businessType != 4"> |
| | | <el-col :span="24" v-if="expertfrom == '2'"> |
| | | <el-form-item |
| | | label="单位名称" |
| | |
| | | </el-select> </el-form-item |
| | | ></el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-row v-if="businessType != 4"> |
| | | <el-col :span="24" v-if="expertfrom == '2'"> |
| | | <el-form-item |
| | | label="开户银行" |
| | |
| | | > |
| | | </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 |
| | | :limit="20" |
| | | drag |
| | | :headers="headers" |
| | | :on-success=" |
| | | (response, file, fileList) => |
| | |
| | | :on-preview="downFile" |
| | | :disabled="operationType == 'detail'" |
| | | :on-error="handleUploadError" |
| | | :on-exceed="handleExceed" |
| | | :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%" |
| | | 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 |
| | | class="pdftit" |
| | |
| | | </div> --> |
| | | </div> |
| | | |
| | | <div v-if="this.previewpdf" class="pdfimgmin"> |
| | | <div v-if="this.previewpdf && pdfimgsrcList.length" class="pdfimgmin"> |
| | | <!-- <img :src="pdfimg" /> --> |
| | | <el-image |
| | | style="width: 100px; height: 100px" |
| | | style="width: 95%; height: 90%" |
| | | :src="pdfimg" |
| | | :preview-src-list="pdfimgsrcList" |
| | | > |
| | |
| | | <div v-else class="pdfimgmins">{{ hintitle }}</div> |
| | | </div> |
| | | </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> |
| | | |
| | | <!-- 批量选取 --> |
| | | <el-dialog |
| | | title="批量生成明细信息" |
| | | :visible.sync="batchdialogVisible" |
| | | width="30%" |
| | | > |
| | | <div style="max-height: 300px; overflow-y: auto"> |
| | | <el-checkbox |
| | | :indeterminate="isIndeterminate" |
| | | v-model="checkAll" |
| | | @change="handleCheckAllChange" |
| | | >全选</el-checkbox |
| | | > |
| | | <div style="margin: 15px 0;"></div> |
| | | <el-checkbox-group |
| | | v-model="checkedCities" |
| | | @change="handleCheckedCitiesChange" |
| | | > |
| | | <el-checkbox |
| | | border |
| | | v-for="city in cityOptions" |
| | | :label="city" |
| | | :key="city.reportNo" |
| | | >{{ city.reportName }}</el-checkbox |
| | | > |
| | | </el-checkbox-group> |
| | | </div> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="BatchentryFn">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | // 'sdaad2123UD2',1 'wsadadwsad',4 'sdadaddad',3 'ssaaddxs',2 |
| | | //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等) |
| | | //例如:import 《组件名称》 from '《组件路径》'; |
| | | import { |
| | | listDonatebaseinfo, |
| | | getDonatebaseinfo |
| | | } from "@/api/project/donatebaseinfo"; |
| | | |
| | | import debounce from "lodash/debounce"; |
| | | import { |
| | | onelistFund, |
| | | listFund, |
| | |
| | | Li_area_select, |
| | | OrgSelecter |
| | | }, |
| | | |
| | | name: "fundApply", |
| | | |
| | | dicts: [ |
| | |
| | | // 导出遮罩层 |
| | | exportLoading: false, |
| | | usernamedata: "", |
| | | jurisdiction: false, |
| | | |
| | | // 表单参数 |
| | | form: {}, |
| | | |
| | | experthear: "", |
| | | spocewl: "", |
| | | //费用申请表单title |
| | | title: "", |
| | | //申请单类型 |
| | |
| | | unitList: [], |
| | | //费用报销机构列表 |
| | | feeUnitList: [], |
| | | |
| | | // 网络请求头 |
| | | Networkheader: null, |
| | | batchdialogVisible: false, |
| | | itemlist: [], |
| | | cityOptions: [], |
| | | checkAll: false, |
| | | checkedCities: [], |
| | | Personnelforname: "请选择", |
| | | unitforname: "请选择", |
| | | isIndeterminate: true, |
| | | |
| | | //是否是专家费的OPO审批人员 |
| | | ismanager: false, |
| | |
| | | rowfeeblocks: [], |
| | | |
| | | fundflowList: [], |
| | | // 随机数 |
| | | randomnumber: "", |
| | | |
| | | //专家/单位选择:expert/unit |
| | | selectionType: "", |
| | |
| | | pdfimgsrcList: [], |
| | | pdfVisible: false, |
| | | previewpdf: false, |
| | | hintitle: "选中左侧已上传文件预览查看", |
| | | atpresent: "" |
| | | hintitle: "请上传文件后查看", |
| | | atpresent: "", |
| | | Savereminder: false, //提醒保存弹框 |
| | | Reminderquantity: 0, //提醒数量 |
| | | totalquantity: 0, //总数量 |
| | | Modifyornot: 0 //是否修改 |
| | | }; |
| | | }, |
| | | |
| | | //监听属性 类似于data概念 |
| | | computed: {}, |
| | | //监控data中的数据变化 |
| | | watch: {}, |
| | | //方法集合 |
| | | methods: { |
| | | bbaaccss(val) { |
| | | console.log(val); |
| | | console.log(this.funddetailForm); |
| | | }, |
| | | // 浏览器页面关闭或刷新提示 |
| | | beforeunloadHandler(e) { |
| | | if ( |
| | | (JSON.stringify(this.form) == sessionStorage.getItem("apiform") && |
| | | JSON.stringify(this.rbDetails) == |
| | | sessionStorage.getItem("apifunddetail")) || |
| | | !sessionStorage.getItem("apifunddetail") |
| | | ) { |
| | | console.log(cg); |
| | | } else { |
| | | this._beforeUnload_time = new Date().getTime(); |
| | | e = e || window.event; |
| | | if (e) { |
| | | e.returnValue = "关闭提示"; |
| | | } |
| | | return "关闭提示"; |
| | | } |
| | | }, |
| | | |
| | | // 表单重置 |
| | | reset() { |
| | | this.form = { |
| | |
| | | //清空附件 |
| | | this.fileList = []; |
| | | }, |
| | | // 获取请求头 |
| | | Getnetworkheader() { |
| | | let string = window.location.href; |
| | | if (string.includes("9091")) { |
| | | const index = string.indexOf("9091"); |
| | | this.Networkheader = string.slice(0, index + 4); // 截取9091及其前部字符 |
| | | // console.log(this.Networkheader); |
| | | } else { |
| | | const index = string.indexOf("8032"); |
| | | this.Networkheader = string.slice(0, index + 4); // 截取8032及其前部字符 |
| | | } |
| | | }, |
| | | /** 通过参数获取业务类型 */ |
| | | getroute() { |
| | | //选择业务类型:1、新增;2、修改;3、查看 |
| | |
| | | } else if (this.businessType == "4") { |
| | | this.businessName = "办公费用报销单"; |
| | | this.amountLabel = "金额"; |
| | | this.getUnitList(); |
| | | |
| | | // this.getBaseInfoList(); |
| | | } |
| | |
| | | this.handleUpdate(); |
| | | } else if (this.operationType == "detail") { |
| | | this.title = this.businessName + "查看"; |
| | | this.jurisdiction = true; |
| | | this.handleDetail(); |
| | | } else if (this.operationType == "check") { |
| | | this.title = this.businessName + "审核"; |
| | |
| | | |
| | | getFund(this.curId).then(response => { |
| | | this.form = response.data; |
| | | sessionStorage.removeItem("apiform"); |
| | | |
| | | sessionStorage.setItem("apiform", JSON.stringify(this.form)); |
| | | |
| | | // this.form.recordstate =-1; |
| | | // this.form.recordstatus = response.data.recordstatus + ""; |
| | | //附件处理 |
| | |
| | | //明细处理 |
| | | getownFundDetail(this.curId).then(res => { |
| | | this.rbDetails = res.data; |
| | | |
| | | if (this.rbDetails.length > 0) { |
| | | for (let m = 0; m < this.rbDetails.length; m++) { |
| | | this.rbDetails[m].itemlist = []; |
| | |
| | | // }); |
| | | // }); |
| | | } |
| | | console.log("yeil"); |
| | | sessionStorage.removeItem("apifunddetail"); |
| | | sessionStorage.setItem( |
| | | "apifunddetail", |
| | | JSON.stringify(this.rbDetails) |
| | | ); |
| | | } else { |
| | | this.addRow(0); |
| | | } |
| | | }); |
| | | let listFundflowparams = { |
| | | fundid: this.curId, |
| | | fundtype: 2 |
| | | }; |
| | | listFundflow(listFundflowparams).then(res => { |
| | | this.fundflowList = res.rows; |
| | | }); |
| | | console.log(this.fundflowList); |
| | | }); |
| | | }, |
| | | |
| | |
| | | |
| | | getFund(this.curId).then(response => { |
| | | this.form = response.data; |
| | | sessionStorage.removeItem("apiform"); |
| | | |
| | | sessionStorage.setItem("apiform", JSON.stringify(this.form)); |
| | | |
| | | console.log("response.data", response.data); |
| | | //附件处理 |
| | | // this.fileList = this.form.annexbankcard ? this.form.annexbankcard.split(",").map(item => ({ url: item, name: item })) : [] |
| | |
| | | }); |
| | | }, |
| | | |
| | | /** 修改按钮操作 */ |
| | | /** 查看按钮操作 */ |
| | | handleCheck() { |
| | | this.isopen = 0; |
| | | this.reset(); |
| | | |
| | | getFund(this.curId).then(response => { |
| | | this.form = response.data; |
| | | sessionStorage.removeItem("apiform"); |
| | | |
| | | sessionStorage.setItem("apiform", JSON.stringify(this.form)); |
| | | |
| | | //附件处理 |
| | | // this.fileList = this.form.annexbankcard ? this.form.annexbankcard.split(",").map(item => ({ url: item, name: item })) : [] |
| | | |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | 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; |
| | |
| | | }); |
| | | } |
| | | |
| | | // 计算税前金额 |
| | | // 计算税前、税费、税后金额 |
| | | if (tempDetail.amount == undefined || tempDetail.amount == null || tempDetail.amount == 0 || tempDetail.amount == '') { |
| | | //获取参数 |
| | | this.taxParam.money = tempDetail.taxedamount.toString(); |
| | |
| | | } |
| | | */ |
| | | } |
| | | //计算当前行报销内容费用合计,税前金额(amount)、扣税金额(taxamount)、税后金额(taxedamount) |
| | | if (this.businessType == "2") { |
| | | for (let j = 0; j < this.rbDetails.length; j++) { |
| | | let tempDetail = this.rbDetails[j]; |
| | | if ( |
| | | isNaN(parseFloat(tempDetail.amount)) || |
| | | parseFloat(tempDetail.amount) == 0 |
| | | ) { |
| | | this.$modal.msgWarning( |
| | | "服务项目表中,第" + |
| | | (j + 1).toString() + |
| | | "行的金额未输入,请先输入金额后再提交保存!" |
| | | ); |
| | | return; |
| | | } |
| | | } |
| | | } else if (this.businessType == "3" || this.businessType == "4") { |
| | | for (let j = 0; j < this.rbDetails.length; j++) { |
| | | let tempDetail = this.rbDetails[j]; |
| | | if ( |
| | | isNaN(parseFloat(tempDetail.amount)) || |
| | | parseFloat(tempDetail.amount) == 0 |
| | | ) { |
| | | this.$modal.msgWarning( |
| | | "服务项目表中,第" + |
| | | (j + 1).toString() + |
| | | "行的金额未输入,请先输入金额后再提交保存!" |
| | | ); |
| | | return; |
| | | } |
| | | if ( |
| | | isNaN(parseFloat(tempDetail.taxamount)) || |
| | | parseFloat(tempDetail.taxamount) == 0 |
| | | ) { |
| | | tempDetail.taxedamount = parseFloat(tempDetail.amount); |
| | | } else { |
| | | tempDetail.taxedamount = |
| | | parseFloat(tempDetail.amount) + |
| | | parseFloat(tempDetail.taxamount); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //费用合计 |
| | | // this.form.pretaxcost = parseFloat(this.totalPreTaxAmount).toFixed(2); |
| | | // this.form.taxedcost = parseFloat(this.totalAfterTaxAmount).toFixed(2); |
| | |
| | | this.$modal.msgError("申请单保存失败:" + response.msg); |
| | | } |
| | | }); |
| | | sessionStorage.setItem( |
| | | "apifunddetail", |
| | | JSON.stringify(this.rbDetails) |
| | | ); |
| | | sessionStorage.setItem("apiform", JSON.stringify(this.form)); |
| | | |
| | | //关闭窗口 |
| | | // this.loading = false; |
| | | this.loading = false; |
| | | // this.getfundList(); |
| | | this.$store.dispatch("tagsView/delView", this.$route); |
| | | this.$router.go(-1); |
| | | } |
| | | }); |
| | | }, |
| | | }, 500), |
| | | |
| | | //审批提交 |
| | | checksubmit() { |
| | |
| | | |
| | | //获取费用机构列表 |
| | | getFeeUnitList() { |
| | | console.log("单位"); |
| | | listReportname("org").then(res => { |
| | | this.feeUnitList = res.data; |
| | | }); |
| | | console.log(this.feeUnitList); |
| | | }, |
| | | |
| | | //获取医疗机构列表 |
| | | getUnitList() { |
| | | console.log("医疗机构"); |
| | | listOrganization(3).then(response => { |
| | | for (let i = 0; i < response.rows.length; i++) { |
| | | this.unitList.push({ |
| | |
| | | organizationid: response.rows[i].id, |
| | | organizationname: response.rows[i].organizationname |
| | | }); |
| | | console.log(this.unitList); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | 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; |
| | |
| | | }); |
| | | }, |
| | | |
| | | //校验收费项目是否重复 |
| | | //校验收费项目 |
| | | verifyFeeItem(row) { |
| | | row.itemlist.map(res => { |
| | | if (row.itemid === res.id) { |
| | |
| | | row.itemcode = res.itemCode; |
| | | } |
| | | }); |
| | | var repeatNum = 0; |
| | | this.rbDetails.map(res => { |
| | | if (res.applytype === row.applytype && res.itemid == row.itemid) { |
| | | repeatNum++; |
| | | |
| | | //判断收费项目是否重复 |
| | | if (this.businessType == "1") { |
| | | var repeatNum = 0; |
| | | this.rbDetails.map(res => { |
| | | if (res.applytype === row.applytype && res.itemid == row.itemid) { |
| | | repeatNum++; |
| | | } |
| | | }); |
| | | if (repeatNum > 1) { |
| | | this.$modal.msgWarning("您已经提交过该服务项目了"); |
| | | } |
| | | }); |
| | | if (repeatNum > 1) { |
| | | this.$modal.msgWarning("您已经提交过该服务项目了"); |
| | | } |
| | | |
| | | //获取费用项目的详细信息 |
| | |
| | | }); |
| | | }, |
| | | |
| | | //计算个税: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; |
| | |
| | | // }); |
| | | }, |
| | | |
| | | unsave() { |
| | | this.Savereminder = false; |
| | | this.Reminderquantity = 0; |
| | | }, |
| | | // 接受提醒立刻保存 |
| | | Savenow() { |
| | | if (!this.randomnumber) { |
| | | this.randomnumber = this.generateRandomString(9); |
| | | this.form.randomnumber = this.randomnumber; |
| | | } |
| | | this.Savereminder = false; |
| | | this.Reminderquantity = 0; |
| | | this.totalquantity = 0; |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | this.formData = this.form; |
| | | // let totalPreTaxAmount = 0.0; |
| | | // let totalAfterTaxAmount = 0.0; |
| | | // let totalAmount = 0.0; |
| | | |
| | | //保存前校验数据 |
| | | for (let k = 0; k < this.rbDetails.length; k++) { |
| | | let tempDetail = this.rbDetails[k]; |
| | | if (tempDetail.itemid == null) { |
| | | this.$modal.msgWarning( |
| | | "服务项目表中,第" + |
| | | (k + 1).toString() + |
| | | "行的服务项目未选择,请先选择服务项目后再提交保存!" |
| | | ); |
| | | return; |
| | | } |
| | | |
| | | if (this.businessType == "1") { |
| | | if (tempDetail.servicesscope == null) { |
| | | this.$modal.msgWarning( |
| | | "服务项目表中,第" + |
| | | (k + 1).toString() + |
| | | "行的费用说明未选择,请选择费用说明后再提交保存!" |
| | | ); |
| | | return; |
| | | } |
| | | |
| | | if ( |
| | | tempDetail.beneficiaryno == null || |
| | | tempDetail.beneficiaryno == "点击选择" |
| | | ) { |
| | | this.$modal.msgWarning( |
| | | "服务项目表中,第" + |
| | | (k + 1).toString() + |
| | | "行的服务人员姓名为选择,请选择人员后再提交保存!" |
| | | ); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | // //判断单位 unitSel |
| | | // try { |
| | | // let unitIndex = this.unitList.findIndex( |
| | | // (item) => tempDetail.unitno == item.organizationid |
| | | // ); |
| | | // if (unitIndex > -1) { |
| | | // tempDetail.unitname = this.unitList[unitIndex].organizationname; |
| | | // } else { |
| | | // tempDetail.unitname = tempDetail.unitno; |
| | | // } |
| | | // } catch { |
| | | // tempDetail.unitname = tempDetail.unitno; |
| | | // } |
| | | } |
| | | |
| | | //附件处理 |
| | | let list = this.fileList; |
| | | // if (list.length > 0) { |
| | | // this.form.annexfiles = list.map(item => item.url).join(","); |
| | | // } |
| | | |
| | | //处理明细 |
| | | for (let i = 0; i < this.rbDetails.length; i++) { |
| | | let tempDetail = this.rbDetails[i]; |
| | | //获取服务项目明细 |
| | | let tempitemlist = tempDetail.itemlist; |
| | | let itemIndex = tempitemlist.findIndex( |
| | | item => tempDetail.itemid == item.id |
| | | ); |
| | | if (itemIndex > -1) { |
| | | tempDetail.itemname = tempitemlist[itemIndex].itemName; |
| | | tempDetail.itemid = tempitemlist[itemIndex].id; |
| | | } |
| | | |
| | | //获取applytypename、服务费用大类 |
| | | let applytypeIndex = this.rowfeeItemTypes.findIndex( |
| | | item => tempDetail.applytype == item.value |
| | | ); |
| | | if (applytypeIndex > -1) { |
| | | tempDetail.applytypename = this.rowfeeItemTypes[ |
| | | applytypeIndex |
| | | ].label; |
| | | tempDetail.subjecttype = this.rowfeeItemTypes[ |
| | | applytypeIndex |
| | | ].subjecttype; |
| | | tempDetail.subjecttypename = this.rowfeeItemTypes[ |
| | | applytypeIndex |
| | | ].subjecttypename; |
| | | } |
| | | this.rbDetails[i] = tempDetail; |
| | | /* |
| | | //计算个税 |
| | | //if (isNaN(parseFloat(tempDetail.taxedamount))) |
| | | //获取参数 |
| | | this.taxParam.beneficiaryNo = tempDetail.beneficiaryno; |
| | | this.taxParam.startTime = this.form.createTime.substring(0, 10); |
| | | // 计算税后金额 |
| | | if (tempDetail.taxedamount == undefined || tempDetail.taxedamount == null || tempDetail.taxedamount == 0 || tempDetail.taxedamount == '') { |
| | | //获取参数 |
| | | this.taxParam.money = tempDetail.amount.toString(); |
| | | getTaxByBeneFiciaryNo(this.taxParam).then((res) => { |
| | | if (res.code == 200) { |
| | | 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 == '') { |
| | | //获取参数 |
| | | this.taxParam.money = tempDetail.taxedamount.toString(); |
| | | getTaxBeforeByAfterMoney(this.taxParam).then((res) => { |
| | | if (res.code == 200) { |
| | | 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); |
| | | } |
| | | }); |
| | | } |
| | | */ |
| | | } |
| | | //计算当前行报销内容费用合计,税前金额(amount)、扣税金额(taxamount)、税后金额(taxedamount) |
| | | if (this.businessType == "2") { |
| | | for (let j = 0; j < this.rbDetails.length; j++) { |
| | | let tempDetail = this.rbDetails[j]; |
| | | if ( |
| | | isNaN(parseFloat(tempDetail.amount)) || |
| | | parseFloat(tempDetail.amount) == 0 |
| | | ) { |
| | | this.$modal.msgWarning( |
| | | "服务项目表中,第" + |
| | | (j + 1).toString() + |
| | | "行的金额未输入,请先输入金额后再提交保存!" |
| | | ); |
| | | return; |
| | | } |
| | | } |
| | | } else if (this.businessType == "3" || this.businessType == "4") { |
| | | for (let j = 0; j < this.rbDetails.length; j++) { |
| | | let tempDetail = this.rbDetails[j]; |
| | | if ( |
| | | isNaN(parseFloat(tempDetail.amount)) || |
| | | parseFloat(tempDetail.amount) == 0 |
| | | ) { |
| | | this.$modal.msgWarning( |
| | | "服务项目表中,第" + |
| | | (j + 1).toString() + |
| | | "行的金额未输入,请先输入金额后再提交保存!" |
| | | ); |
| | | return; |
| | | } |
| | | if ( |
| | | isNaN(parseFloat(tempDetail.taxamount)) || |
| | | parseFloat(tempDetail.taxamount) == 0 |
| | | ) { |
| | | tempDetail.taxedamount = parseFloat(tempDetail.amount); |
| | | } else { |
| | | tempDetail.taxedamount = |
| | | parseFloat(tempDetail.amount) + |
| | | parseFloat(tempDetail.taxamount); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //费用合计 |
| | | // this.form.pretaxcost = parseFloat(this.totalPreTaxAmount).toFixed(2); |
| | | // this.form.taxedcost = parseFloat(this.totalAfterTaxAmount).toFixed(2); |
| | | // this.form.amountrequested = this.totalAmount.toFixed(2); |
| | | |
| | | //保存数据 |
| | | this.loading = true; |
| | | this.form.serviceFunddetails = 0; |
| | | this.rbDetails.map(item => { |
| | | this.form.serviceFunddetails += item.amount; |
| | | }); |
| | | console.log(this.rbDetails); |
| | | this.form.serviceFunddetails = this.rbDetails; |
| | | |
| | | if (this.form.id != null) { |
| | | // updateFund(this.form).then((response) => { |
| | | // if (response.code === 200) { |
| | | // this.loading = false; |
| | | // for (let m = 0; m < this.rbDetails.length; m++) { |
| | | // if (this.rbDetails[m].id > 0) { |
| | | // updateFunddetail(this.rbDetails[m]).then((response2) => { if (response.code != 200) { this.$modal.msgError("专家劳务费保存失败1:" + response.msg); } }); |
| | | // } else { |
| | | // addFunddetail(this.rbDetails[m]).then((response2) => { if (response.code != 200) { this.$modal.msgError("专家劳务费保存失败2:" + response.msg); } }); |
| | | // } |
| | | // } |
| | | // this.$modal.msgSuccess("专家劳务费保存成功!"); |
| | | // } else { |
| | | // this.$modal.msgError("专家劳务费保存失败:" + response.msg); |
| | | // } |
| | | // }); |
| | | } else { |
| | | this.form.recordstatus = -1; |
| | | |
| | | // addorupdateFund(this.form).then((response) => { |
| | | // if (response.code === 200) { |
| | | // this.selectDonotor(this.curCase); |
| | | // } else { |
| | | // this.$modal.msgError("专家劳务费保存失败:" + response.msg); |
| | | // } |
| | | // }); |
| | | } |
| | | |
| | | addorupdateFund(this.form).then(response => { |
| | | if (response.code === 200) { |
| | | this.$modal.msgSuccess("申请单保存成功!"); |
| | | this.Getnetworkheader(); |
| | | this.getroute(); |
| | | this.getExternalList(); |
| | | this.getUserList(); |
| | | this.getUserProfile(); |
| | | } else { |
| | | this.$modal.msgError("申请单保存失败:" + response.msg); |
| | | } |
| | | }); |
| | | |
| | | //关闭窗口 |
| | | this.loading = false; |
| | | // this.getfundList(); |
| | | } |
| | | }); |
| | | }, |
| | | handleCheckAllChange(val) { |
| | | console.log(val); |
| | | this.checkedCities = val ? this.cityOptions : []; |
| | | this.isIndeterminate = false; |
| | | }, |
| | | handleCheckedCitiesChange(value) { |
| | | console.log(value); |
| | | console.log(this.checkedCities); |
| | | let checkedCount = value.length; |
| | | console.log(checkedCount); |
| | | this.checkAll = checkedCount === this.cityOptions.length; |
| | | this.isIndeterminate = |
| | | checkedCount > 0 && checkedCount < this.cityOptions.length; |
| | | }, |
| | | // 批量录入点击 |
| | | Batchentry() { |
| | | // ethical |
| | | listReportname("ethical").then(res => { |
| | | console.log(res); |
| | | this.cityOptions = res.data; |
| | | }); |
| | | this.batchdialogVisible = true; |
| | | }, |
| | | // 确认录入 |
| | | BatchentryFn() { |
| | | this.checkedCities.forEach(item => { |
| | | console.log(item); |
| | | let rowData = { |
| | | orderno: null, |
| | | id: item.id, |
| | | fundid: null, |
| | | beneficiaryname: item.reportName, |
| | | beneficiaryno: null, |
| | | unitname: item.unitname, |
| | | unitno: null, |
| | | uintuserno: null, |
| | | title: item.title, |
| | | idcardtype: null, |
| | | idcardno: item.idcrad, |
| | | sex: null, |
| | | familyrelations: null, |
| | | phone: null, |
| | | depositbank: item.depositbank, |
| | | bankcardno: item.bankcardno, |
| | | branchbankname: item.branchbankname, |
| | | annexbankcard: null, |
| | | annexregistform: null, |
| | | applytype: "伦理审核专家费", |
| | | itemid: "器官捐献伦理审核专家费", |
| | | itemname: null, |
| | | itemtype: null, |
| | | amount: null, |
| | | prepaidamount: null, |
| | | taxamount: null, |
| | | invoicecount: null, |
| | | taxedamount: null, |
| | | attachcount: null, |
| | | remark: null, |
| | | recordstatus: "-1", |
| | | delFlag: null, |
| | | createBy: null, |
| | | createTime: null, |
| | | updateBy: null, |
| | | updateTime: null, |
| | | uploadflag: null, |
| | | uploadtime: null, |
| | | itemlist: [], |
| | | servicesscope: null, |
| | | rowfeeblocks: [], |
| | | annexfiles: null |
| | | }; |
| | | |
| | | console.log(rowData); |
| | | this.rbDetails.push(rowData); |
| | | }); |
| | | for (let i = 0; i < this.checkedCities.length + 1; i++) { |
| | | this.rbDetails[i].orderno = i + 1; |
| | | } |
| | | this.batchdialogVisible = false; |
| | | }, |
| | | //新增一行 |
| | | addRow(rowIndex) { |
| | | let rowData = { |
| | |
| | | rowfeeblocks: [], |
| | | annexfiles: null |
| | | }; |
| | | // if (this.Reminderquantity >= 5) { |
| | | // this.Savereminder = true; |
| | | // return; |
| | | // } |
| | | if (rowIndex == undefined || rowIndex == null || rowIndex < 0) { |
| | | this.rbDetails.push(rowData); |
| | | } else { |
| | | this.rbDetails.splice(rowIndex + 1, 0, rowData); |
| | | } |
| | | this.Reminderquantity++; |
| | | this.totalquantity++; |
| | | for (let i = 0; i < this.rbDetails.length; i++) { |
| | | this.rbDetails[i].orderno = i + 1; |
| | | } |
| | |
| | | type: "success" |
| | | }) |
| | | .then(() => { |
| | | console.log(this.rbDetails.length); |
| | | if (this.rbDetails.length == 1) { |
| | | console.log("新增"); |
| | | this.addRow(0); |
| | | } |
| | | if (row.id !== null) { |
| | | delFunddetail(row.id).then(res => { |
| | | if (res.code === 200) { |
| | |
| | | }); |
| | | |
| | | //全部删除后添加一条新行 |
| | | if (this.rbDetails.length == 1) { |
| | | 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); |
| | | }, |
| | | |
| | | // remove(file) { |
| | | // this.fileList.splice(this.fileList.indexOf(file), 1) |
| | | // }, |
| | | remove(file, fileList) { |
| | | const rbDetails = [...this.rbDetails]; |
| | | this.fileListto.splice(this.fileListto.indexOf(file), 1); |
| | | rbDetails[this.atpresent].annexfilesList = this.fileListto; |
| | | }, |
| | | |
| | | handleExceed() { |
| | | this.$message.error(`上传文件数量不能超过 ${5} 个!`); |
| | | }, |
| | | |
| | | //文件上传成功回调 |
| | |
| | | //获取票据信息位置 |
| | | 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.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.pdfimg = this.Networkheader + "/prod-api" + response.fileName; |
| | | |
| | | this.rbDetails[this.atpresent].annexfilesList = this.fileListto; |
| | | } else { |
| | | console.log(response.msg); |
| | | } |
| | | }, |
| | | |
| | | // 点击文件 |
| | | // 点击票据 |
| | | Filepopup(index, rows, row) { |
| | | this.atpresent = index; |
| | | this.pdfVisible = true; |
| | | if (this.rbDetails[index].annexfilesList) { |
| | | this.previewpdf = true; |
| | | this.fileListto = this.rbDetails[index].annexfilesList; |
| | | this.pdfimg = this.Networkheader + "/prod-api" + this.fileListto[0].url; |
| | | // this.pdfimg = this.fileListto[0].url; |
| | | this.pdfimgsrcList = []; |
| | | 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.pdfimg = ""; |
| | | this.pdftitle = ""; |
| | | } |
| | | }, |
| | | |
| | | // 点击已上传文件 |
| | | downFile(item) { |
| | | console.log(item); |
| | | this.pdftitle = item.name; |
| | | let name = item.name.split("."); |
| | | if (name[1] == "pdf") { |
| | |
| | | } else if (name[1] == "jpg" || "png") { |
| | | this.previewpdf = true; |
| | | if (item.url) { |
| | | this.pdfimg = item.url; |
| | | this.pdfimgsrcList = []; |
| | | this.pdfimgsrcList.push(item.url); |
| | | this.pdfimg = this.Networkheader + "/prod-api" + item.url; |
| | | |
| | | // if (!this.pdfimgsrcList.includes(this.pdfimg)) { |
| | | // this.pdfimgsrcList.push(this.pdfimg); |
| | | // console.log("加入"); |
| | | // } |
| | | console.log(this.pdfimg); |
| | | console.log(this.pdfimgsrcList, "imglist"); |
| | | } else { |
| | | this.pdfimg = 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 indexlist = this.getIndexInArray( |
| | | this.pdfimgsrcList, |
| | | this.Networkheader + "/prod-api" + row.url |
| | | ); |
| | | console.log(indexlist); |
| | | this.pdfimgsrcList.splice(indexlist, 1); |
| | | const index = this.getIndexInArray(this.fileListto, row); |
| | | this.fileListto.splice(index, 1); |
| | | console.log(index); |
| | | console.log(this.pdfimgsrcList); |
| | | }, |
| | | // 点击上移 |
| | | 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.spocewl = spoce; |
| | | console.log(spoce); |
| | | this.selectionType = showType; |
| | | if (this.businessType == 4 || !showType) { |
| | | this.selectionType = this.experthear; |
| | | console.log(this.selectionType); |
| | | } |
| | | // if (!showType) { |
| | | // this.selectionType = this.experthear; |
| | | |
| | | // } |
| | | this.expertfrom = "1"; |
| | | |
| | | this.funddetailForm.index = spoce.$index; |
| | |
| | | |
| | | //专家/医疗机构/费用报销机构选择 |
| | | ConfirmDetailDialog() { |
| | | console.log(this.unitforname); |
| | | console.log(this.Personnelforname); |
| | | if (this.experthear == "expert") { |
| | | this.funddetailForm.beneficiaryname = this.unitforname; |
| | | } else { |
| | | console.log(11); |
| | | this.funddetailForm.beneficiaryname = this.Personnelforname; |
| | | console.log(this.funddetailForm.beneficiaryname); |
| | | } |
| | | console.log(this.funddetailForm); |
| | | let tempIndex = this.funddetailForm.index; |
| | | let tempExpertName = this.funddetailForm.beneficiaryname; |
| | | let tempUnitname = this.funddetailForm.unitname; |
| | | let singleDetail = this.rbDetails[tempIndex]; |
| | | console.log(tempExpertName); |
| | | |
| | | if (this.selectionType == "expert") { |
| | | if (this.expertfrom == "1") { |
| | | if (this.selectionType == "expert" || this.businessType == 4) { |
| | | if (this.expertfrom == "1" || this.experthear == "unit") { |
| | | //从专家列表获取信息 |
| | | this.personlist.map(res => { |
| | | if (tempExpertName == res.username) { |
| | |
| | | } |
| | | } |
| | | |
| | | // if (this.experthear == "unit") { |
| | | // singleDetail.unitname = ""; |
| | | // } |
| | | if (this.businessType == 4) { |
| | | singleDetail.beneficiaryname = this.funddetailForm.beneficiaryname; |
| | | } |
| | | console.log(singleDetail); |
| | | console.log(this.funddetailForm); |
| | | this.rbDetails[tempIndex] = singleDetail; |
| | | this.showSelectionDialog = false; |
| | | } |
| | |
| | | //生命周期 - 创建完成(可以访问当前this实例) |
| | | created() { |
| | | //获取路由参数 |
| | | this.Getnetworkheader(); |
| | | this.getroute(); |
| | | this.getExternalList(); |
| | | this.getFeeUnitList(); |
| | | }, |
| | | |
| | | //生命周期 - 挂载完成(可以访问DOM元素) |
| | | mounted() { |
| | | window.addEventListener("beforeunload", e => this.beforeunloadHandler(e)); |
| | | this.getUserList(); |
| | | this.getUserProfile(); |
| | | let apifunddetailForm = this.funddetailForm; |
| | | let apiform = this.form; |
| | | console.log(apiform); |
| | | console.log(apifunddetailForm); |
| | | |
| | | // this.getFeeUnitList(); |
| | | }, |
| | | |
| | |
| | | height: 600px; |
| | | |
| | | .box-pdf { |
| | | width: 200px; |
| | | width: 400px; |
| | | padding-top: 20px; |
| | | margin-right: 30px; |
| | | border: 1px solid #dcdfe6; |
| | |
| | | line-height: 36px; |
| | | text-align: center; |
| | | } |
| | | ::v-deep .el-alert__title { |
| | | font-size: 25px; |
| | | line-height: 25px; |
| | | } |
| | | ::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered { |
| | | margin-left: 0 !important; |
| | | margin-bottom: 10px; |
| | | } |
| | | </style> |