| | |
| | | </el-col> |
| | | |
| | | <el-col :span="6"> |
| | | <el-form-item label="报销人" prop="username"> |
| | | <el-input v-model="queryParams.username" placeholder="请输入报销人" clearable size="small" |
| | | <el-form-item label="经办人" prop="username"> |
| | | <el-input v-model="queryParams.username" placeholder="请输入经办人" clearable size="small" |
| | | @keyup.enter.native="handleQuery" /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <dict-tag :options="dict.type.sys_recordstatus" :value="scope.row.recordstatus" /> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- |
| | | <el-table-column label="报销人类别" width="120" align="center" prop="costtype"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_travelexpensebelong" :value="scope.row.costtype" /> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column>--> |
| | | <el-table-column label="申请时间" width="120" align="center" prop="createTime"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="报销人" width="120" align="center" prop="username"> |
| | | </el-table-column> |
| | | <el-table-column label="经办人" width="120" align="center" prop="username"> |
| | | </el-table-column><!-- |
| | | <el-table-column label="出差人" width="180" align="center" prop="travelers"> |
| | | </el-table-column> |
| | | </el-table-column>--> |
| | | <el-table-column label="报销金额" width="120" align="center" prop="amountrequested"> |
| | | </el-table-column> |
| | | <el-table-column label="出差事由" align="center" width="280" prop="reason"> |
| | | </el-table-column> |
| | | <el-table-column label="联系电话" width="120" align="center" prop="phone"> |
| | | <!-- <el-table-column label="联系电话" width="120" align="center" prop="phone"> |
| | | </el-table-column> |
| | | <el-table-column label="开户银行" width="180" align="center" prop="depositbank"> |
| | | </el-table-column> |
| | | <el-table-column label="银行卡号" width="180" align="center" prop="bankcardno"> |
| | | </el-table-column> |
| | | <!-- <el-table-column label="报销合计" align="center" prop="financechecher"/>--> |
| | | <el-table-column label="报销合计" align="center" prop="financechecher"/>--> |
| | | <!-- <el-table-column label="财务审核" width="120" align="center" prop="financechecher" /> --> |
| | | <el-table-column label="捐献者" width="120" align="center" prop="donorname"> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width" width="270"> |
| | | <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width" width="300"> |
| | | <template slot-scope="scope"> |
| | | <el-button v-if="scope.row.recordstatus == -1 || scope.row.recordstatus == 1" size="mini" type="text" |
| | | icon="el-icon-upload2" @click="handleup(scope.row)">上报</el-button> |
| | |
| | | icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleDetail(scope.row)">查看</el-button> |
| | | <!-- v-hasPermi="['project:funddetail:edit']" --> |
| | | <el-button size="mini" type="text" icon="el-icon-download" @click="gettable(scope.row)"> |
| | | 下载 |
| | | </el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-download" @click="gettable(scope.row)"> 下载 </el-button> |
| | | <!-- v-hasPermi="['project:funddetail:edit']" --> |
| | | <el-button v-if="scope.row.recordstatus == -1 || scope.row.recordstatus == 1" size="mini" type="text" |
| | | icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button> |
| | |
| | | <el-form-item label="经办人" prop="username"> |
| | | <el-select v-model="form.username" clearable filterable allow-create ref="getReportname" |
| | | default-first-option placeholder="请选择"> |
| | | <el-option v-for="item in reporters" :key="item.reportNo" :label="item.reportName" |
| | | <el-option v-for="item in personsList" :key="item.reportNo" :label="item.reportName" |
| | | :value="item.reportName"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | |
| | | <el-col :span="5"> |
| | | <el-form-item label="捐献者" prop="infoid"> |
| | | <el-select v-model="form.infoid" @change="selectbaseinfo" filterable placeholder="请选择捐献者"> |
| | | <el-select v-model="form.infoid" @change="selectbaseinfo" filterable placeholder="请选择捐献者"> |
| | | <el-option v-for="item in baselist" :key="item.index" :label="item.name" :value="item.infoid"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- |
| | | <!-- |
| | | <el-row> |
| | | <el-col :span="15"> |
| | | <el-form-item label="出差事由" prop="reason"> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="报销人" prop="travelers"> |
| | | <el-form-item label="出差人" prop="travelers"> |
| | | <el-select v-model="form.travelers" clearable filterable allow-create ref="getReportname" |
| | | default-first-option placeholder="请选择" @change="selectedTraveler"> |
| | | default-first-option placeholder="请选择" @change="getAccountinfo()"> |
| | | <el-option v-for="item in travelers" :key="item.reportNo" :label="item.reportName" |
| | | :value="item.reportName"> |
| | | </el-option> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | --> |
| | | <!-- |
| | | <!-- |
| | | <el-row type="flex" :gutter="10" align="right" class="mb8"> |
| | | <el-col :span="6"> |
| | | <el-button |
| | |
| | | plain |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="addRow" |
| | | @click="addDetailRow" |
| | | >新增一行</el-button |
| | | > |
| | | </el-col> |
| | | </el-row> |
| | | --> |
| | | --> |
| | | <el-row> |
| | | <el-table :data="applicationDetailArr" border highlight-current-row> |
| | | <el-col :span="20">报销明细录入:</el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-table :data="rbDetails" border highlight-current-row> |
| | | <el-table-column prop="orderno" slot="" label="序号" align="center" fixed width="65"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.orderno" placeholder="序号" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="persontype" slot="" label="人员类别" align="center" fixed width="120"> |
| | | <!--主键、外不展示--> |
| | | <el-table-column prop="id" slot="" label="主键" align="center" fixed width="95" v-if="false"> |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="form.persontype" value-key="value" placeholder="人员类别" @change="getTravelers"> |
| | | <el-option v-for="dict in dict.type.sys_travelexpensebelong" :key="dict.value" :label="dict.label" |
| | | :value="dict.value"></el-option> |
| | | </el-select> |
| | | <el-input v-model="scope.row.id" placeholder="id" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="personname" slot="" label="出差人" align="center" fixed width="120"> |
| | | <el-table-column prop="rbid" slot="" label="外键" align="center" fixed width="95" v-if="false"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.personname" placeholder="出差人" /> |
| | | <el-input v-model="scope.row.rbid" placeholder="rbid" /> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="persontype" slot="" label="人员类别" align="center" fixed width="130"> |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.persontype" value-key="value" placeholder="人员类别" |
| | | @change="getPersons(scope.row)"> |
| | | <el-option v-for="dict in dict.type.sys_travelexpensebelong" :key="dict.value" :label="dict.label" |
| | | :value="dict.label"></el-option> |
| | | |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="personname" slot="" label="费用人员" align="center" fixed width="110"> |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.personname" clearable filterable allow-create default-first-option |
| | | placeholder="请选择" @focus1="getPersons(scope.row)"> |
| | | <el-option v-for="item in personsSel" :key="item.reportNo" :label="item.reportName" |
| | | :value="item.reportName"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="starttime" slot="" label="开始日期" fixed align="center" width="150"> |
| | |
| | | </el-date-picker> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="departure" slot="" label="出发地" align="center" fixed width="100"> |
| | | <el-table-column prop="departure" slot="" label="出发地" align="center" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.departure" placeholder="出发地" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="到达地" prop="destination" align="center" fixed width="100"> |
| | | <el-table-column label="到达地" prop="destination2" align="center" width="140"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.destination" placeholder="到达地" @blur="getallowance(scope.row)" /> |
| | | <!-- <el-input v-model="scope.row.destination" placeholder="到达地" @blur="getallowance(scope.row)" /> --> |
| | | |
| | | <el-select filterable allow-create v-model="scope.row.destination" value-key="value" placeholder="到达地" |
| | | @change="getallowance2(scope.row, scope.row.destination)"> |
| | | <el-option v-for="dict in dict.type.sys_area_name" :key="dict.value" :label="dict.label" |
| | | :value="dict.value"></el-option> |
| | | |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="days" label="天数" width="65" align="center"> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="trafficexpense" label="交通费" align="center" width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.trafficexpense" placeholder="交通费" @blur=" |
| | | (val) => { |
| | | sumTotalFee(); |
| | | } |
| | | " /> |
| | | <el-input v-model="scope.row.trafficexpense" placeholder="交通费" @blur="(val) => { |
| | | sumTotalFee(); |
| | | } |
| | | " /> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- |
| | | <!-- |
| | | <el-table-column prop="cityfee" label="市内交通费" align="center" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.cityfee" placeholder="市内交通费" @blur=" |
| | |
| | | --> |
| | | <el-table-column prop="hotelexpense" label="住宿费" align="center" width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.hotelexpense" placeholder="住宿费" @blur=" |
| | | (val) => { |
| | | sumTotalFee(); |
| | | } |
| | | " /> |
| | | <el-input v-model="scope.row.hotelexpense" placeholder="住宿费" @blur="(val) => { |
| | | sumTotalFee(); |
| | | } |
| | | " /> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="foodexpenses" label="餐费报销" align="center" width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.foodexpenses" placeholder="伙食费报销" @blur=" |
| | | (val) => { |
| | | sumTotalFee(); |
| | | } |
| | | " /> |
| | | <el-input v-model="scope.row.foodexpenses" placeholder="伙食费报销" @blur="(val) => { |
| | | sumTotalFee(); |
| | | } |
| | | " /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="foodallowance" label="伙食补助" align="center" width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.foodallowance" placeholder="伙食费补助" @blur=" |
| | | (val) => { |
| | | sumTotalFee(); |
| | | } |
| | | " /> |
| | | <el-input v-model="scope.row.foodallowance" placeholder="伙食费补助" @blur="(val) => { |
| | | sumTotalFee(); |
| | | } |
| | | " /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="otherexpense" label="公杂费补助" align="center" width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.otherexpense" placeholder="杂费" @blur=" |
| | | (val) => { |
| | | sumTotalFee(); |
| | | } |
| | | " /> |
| | | <el-input v-model="scope.row.otherexpense" placeholder="杂费" @blur="(val) => { |
| | | sumTotalFee(); |
| | | } |
| | | " /> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="otherfeeamount" label="其他费用" align="center" width="90"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.otherfeeamount" placeholder="其他费用" @blur=" |
| | | (val) => { |
| | | sumTotalFee(); |
| | | } |
| | | " /> |
| | | <el-input v-model="scope.row.otherfeeamount" placeholder="其他费用" @blur="(val) => { |
| | | sumTotalFee(); |
| | | } |
| | | " /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="departure" slot="" label="其他费用说明" align="center" width="120"> |
| | |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" align="center" width="120" v-if="dialogType == 'edit'"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="mini" @click="addRow(scope.$index)">新增</el-button> |
| | | <el-button @click.native.prevent=" |
| | | deleteRow(scope.$index, applicationDetailArr, scope.row) |
| | | " type="text" size="small"> |
| | | <el-button type="text" size="mini" @click="addDetailRow(scope.$index)">新增</el-button> |
| | | <el-button @click.native.prevent="deleteDetailRow(scope.$index, rbDetails, scope.row) |
| | | " type="text" size="small"> |
| | | 删除 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="20">报销请款明细:</el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 30px"> |
| | | <el-table :data="rbPayees" border highlight-current-row> |
| | | <el-table-column prop="orderno" slot="" label="序号" align="center" fixed width="65"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.orderno" placeholder="序号" /> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <!-- |
| | | <!--主键、外键不展示--> |
| | | <el-table-column prop="id" slot="" label="主键" align="center" fixed width="95" v-if="false"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.id" placeholder="id" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="rbid" slot="" label="外键" align="center" fixed width="95" v-if="false"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.rbid" placeholder="rbid" /> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="persontype" slot="" label="人员类别" align="center" fixed width="130"> |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.persontype" value-key="value" placeholder="人员类别" |
| | | @change="getPersons(scope.row)"> |
| | | <el-option v-for="dict in dict.type.sys_travelexpensebelong" :key="dict.value" :label="dict.label" |
| | | :value="dict.label"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="personname" slot="" label="收款人" align="center" fixed width="110"> |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.personname" clearable filterable allow-create ref="getReportname" |
| | | default-first-option placeholder="请选择" @change="getAccountinfo2(scope.row, scope.row.persontype)"> |
| | | <el-option v-for="item in personsSel" :key="item.reportNo" :label="item.reportName" |
| | | :value="item.reportName"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="bankname" slot="" label="银行名称" align="center" fixed width="200"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.bankname" placeholder="银行名称" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="bankcardno" slot="" label="银行卡号" align="center" fixed width="200"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.bankcardno" placeholder="银行卡号" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="amount" slot="" label="打款金额" align="center" fixed width="130"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.amount" placeholder="打款金额" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remark" slot="" label="请款说明" align="center" fixed width="280"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.remark" placeholder="说明" /> |
| | | </template> |
| | | </el-table-column><el-table-column prop="paiddate" slot="" label="打款日期" fixed align="center" width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-date-picker clearable size="small" style="width: 100%" v-model="scope.row.paiddate" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" placeholder="打款日期" :disabled="true" @blur="getallowance(scope.row)"> |
| | | </el-date-picker> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" width="100" v-if="dialogType == 'edit'"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="mini" @click="addPayeeRow(scope.$index)">新增</el-button> |
| | | <el-button @click.native.prevent="deletePayeeRow(scope.$index, rbPayees, scope.row) |
| | | " type="text" size="small"> |
| | | 删除 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | </el-row> |
| | | |
| | | <!-- |
| | | <el-row> |
| | | <el-col :span="7"> |
| | | <el-form-item label="中心负责人" prop="opochecker"> |
| | |
| | | --> |
| | | <el-row> |
| | | <el-col :span="14"> |
| | | <!-- |
| | | <!-- |
| | | <el-form-item label="文件地址" prop="fileurl"> |
| | | <el-input v-model="form.fileurl" placeholder="请输入文件地址" /> |
| | | </el-form-item> |
| | |
| | | <el-form-item label="文件上传" align="left" prop="annexfiles"> |
| | | <!-- <file-upload ref="fileUpload" :fileType=fileType :limit="1" :on-success="handleUploadSuccess"></file-upload> --> |
| | | <el-upload size="mini" class="upload-demo" :action="uploadFileUrl" :file-list="fileList" multiple :limit="5" |
| | | :headers="headers" :on-success=" |
| | | (response, file, fileList) => |
| | | uploadSccess(response, file, fileList) |
| | | " :on-preview="downFile" :disabled='dialogType == "detail"' :on-error="handleUploadError" |
| | | :headers="headers" :on-success="(response, file, fileList) => |
| | | uploadSccess(response, file, fileList) |
| | | " :on-preview="downFile" :disabled='dialogType == "detail"' :on-error="handleUploadError" |
| | | :on-exceed="handleExceed" :on-remove="remove" accept="image/*,.pdf"> |
| | | <el-button :disabled='dialogType == "detail"' size="small" type="primary">上传</el-button> |
| | | </el-upload> |
| | |
| | | |
| | | <script> |
| | | import { listDonatebaseinfo } from "@/api/project/donatebaseinfo"; |
| | | import { listReimbursementpayee, addReimbursementpayee, updateReimbursementpayee } from "@/api/project/reimbursementpayee"; |
| | | import { |
| | | listReimbursement, |
| | | getReimbursement, |
| | |
| | | updateReimbursement, |
| | | exportReimbursement, |
| | | getdownload, |
| | | //获取地市对应基准金额 |
| | | getstandardRMB, |
| | | fundSubmit, |
| | | } from "@/api/project/reimbursement"; |
| | | import { |
| | |
| | | listReimbursementdetailid, |
| | | getReimbursementdetaillist, |
| | | delReimbursementdetail, |
| | | delReimbursementdetailrbid, |
| | | addOrupdateReimbursementdetaillist, |
| | | getTravelStandard, |
| | | } from "@/api/project/reimbursementdetail"; |
| | | import { listFundflow } from "@/api/project/fundflow"; |
| | |
| | | import { regionDataPlus, CodeToText } from "element-china-area-data"; |
| | | import Li_area_select from "@/components/Address"; |
| | | import { getUserProfile } from "@/api/system/user"; |
| | | import { |
| | | listOrganization, |
| | | getOrganization, |
| | | listReportname, |
| | | listUser, |
| | | } from "@/api/project/organization"; |
| | | import { getSubsidy } from "@/api/project/travelcity"; |
| | | import { listReportname, listUser } from "@/api/project/organization"; |
| | | import { getToken } from "@/utils/auth"; |
| | | export default { |
| | | components: { |
| | |
| | | "sys_recordstatus", |
| | | "sys_travelexpensebelong", |
| | | "sys_traffictype", |
| | | "sys_area_name", |
| | | "sys_traffictype" |
| | | ], |
| | | data() { |
| | | return { |
| | | reporters: [], |
| | | travelers: [], |
| | | //OPO协调员 |
| | | personsXty: [], |
| | | //OPO专职人员 |
| | | personsZzry: [], |
| | | //OPO管理人员 |
| | | personsManager: [], |
| | | //OPO专家 |
| | | personsExpert: [], |
| | | //全部人员 |
| | | personsList: [], |
| | | //下拉可以选择人员列表 |
| | | personsSel: [], |
| | | |
| | | costtypeobj: { |
| | | value: 0, |
| | | label: "", |
| | | }, |
| | | userlist: [], |
| | | |
| | | options: regionDataPlus, |
| | | selectedOptions: [], |
| | | searchAddress: { |
| | |
| | | remark: null, |
| | | departure: null, |
| | | endtime: null, |
| | | destination: null, |
| | | destination2: null, |
| | | uploadFlag: null, |
| | | uploadTime: null, |
| | | orderByColumn: "createTime", |
| | | // orderByColumn: "createTime", |
| | | orderByColumn: "id", |
| | | isAsc: "desc", |
| | | }, |
| | | queryParams2: { |
| | | persontype: null, |
| | | arriveAddr: null, |
| | | }, |
| | | //查询付款 |
| | | queryParamsPayee: { |
| | | rbid: null, |
| | | }, |
| | | // 表单参数 |
| | | form: {}, |
| | |
| | | donorname: null, |
| | | bigstrmoney: null, |
| | | }, |
| | | applicationDetailArr: [], |
| | | |
| | | rbDetails: [], |
| | | rbPayees: [], |
| | | arrr2: [], |
| | | baselist: [], |
| | | balist: [], |
| | | donatorList: [], |
| | | standardlevel: 0, |
| | | defaultperson: {}, |
| | | fundflowList: [], |
| | |
| | | uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", |
| | | //文件列表 |
| | | fileList: [], |
| | | //人员类别 |
| | | persontype: null, |
| | | //到达地 |
| | | arriveAddr: null, |
| | | |
| | | headers: { |
| | | Authorization: "Bearer " + getToken(), |
| | | }, |
| | | }; |
| | | }, |
| | | |
| | | created() { |
| | | //获取记录列表 |
| | | this.getList(); |
| | | this.getlistUser(); |
| | | this.selectReporters(); |
| | | |
| | | //获取报销中的人员信息 |
| | | this.getPersonList(); |
| | | }, |
| | | |
| | | mounted() { |
| | | //获取捐献者姓名 |
| | | listDonatebaseinfo().then((res) => { |
| | | // console.log("base基础表数据", res.rows); |
| | | let list = res.rows; |
| | | let baseinfolist = []; |
| | | this.balist = list; |
| | | this.donatorList = list; |
| | | list.forEach((element) => { |
| | | baseinfolist.push({ |
| | | infoid: element.id, |
| | | name: element.name, |
| | | }); |
| | | }); |
| | | // console.log("组合的新数组", baseinfolist); |
| | | |
| | | if (baseinfolist != 0) { |
| | | this.baselist = baseinfolist; |
| | | } |
| | | }); |
| | | |
| | | //获取登录者信息 |
| | | this.getUsermsg(); |
| | | }, |
| | | |
| | | methods: { |
| | | handleUploadError() { }, |
| | | |
| | | remove(file) { |
| | | |
| | | this.fileList.splice(this.fileList.indexOf(file), 1) |
| | | |
| | | }, |
| | | |
| | | handleExceed() { |
| | | this.$message.error(`上传文件数量不能超过 ${5} 个!`); |
| | | }, |
| | | |
| | | //文件上传成功回调 |
| | | uploadSccess(response, file, fileList) { |
| | | //获取附件信息位置 |
| | |
| | | this.$modal.msgError(response.msg); |
| | | } |
| | | }, |
| | | selectReporters() { |
| | | //专家人员列表 |
| | | let arr = ["xty1", "zzry", "fzr"]; |
| | | let arrreportlist = []; |
| | | for (let i = 0; i < arr.length; i++) { |
| | | this.arrr2 = []; |
| | | listReportname(arr[i]).then((res) => { |
| | | this.arrr2 = res.data; |
| | | this.reporters = this.reporters.concat(this.arrr2); |
| | | // console.log("adadadadasdsad", this.reporters); |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | //获取出差人列表 |
| | | getTravelers() { |
| | | //专职人员-1,协调员-2,专家-3,家属-4,其他人员-5 |
| | | let travelertype = ""; |
| | | if (this.form.costtype == 1) { |
| | | travelertype = "zzry"; |
| | | } else if (this.form.costtype == 2) { |
| | | travelertype = "xty1"; |
| | | } else if (this.form.costtype == 3) { |
| | | travelertype = "expert"; |
| | | } else if (this.form.costtype == 4) { |
| | | travelertype = "jiashu"; |
| | | } else if (this.form.costtype == 5) { |
| | | travelertype = "fzr"; |
| | | } |
| | | |
| | | listReportname(travelertype).then((res) => { |
| | | this.travelers = res.data; |
| | | }); |
| | | }, |
| | | |
| | | selectcosttype() { |
| | | this.form.costtype = this.costtypeobj.value; |
| | | this.form.costtypename = this.costtypeobj.label; |
| | | }, |
| | | |
| | | //获取登录用户信息 |
| | | getUsermsg() { |
| | | getUserProfile().then((response) => { |
| | | this.defaultperson = response.data; |
| | | this.standardlevel = response.data.standardlevel; |
| | | }); |
| | | }, |
| | | getlistUser() { |
| | | listUser().then((res) => { |
| | | this.userlist = res.data; |
| | | |
| | | //获取人员列表 |
| | | getPersonList() { |
| | | //获取OPO协调员名单 |
| | | listReportname("xty1").then((res) => { |
| | | this.personsXty = res.data; |
| | | this.personsList = this.personsXty; |
| | | |
| | | //OPO专职人员名单 |
| | | listReportname("zzry").then((res) => { |
| | | this.personsZzry = res.data; |
| | | this.personsList = this.personsList.concat(this.personsZzry); |
| | | |
| | | //OPO管理人员名单 |
| | | listReportname("fzr").then((res) => { |
| | | this.personsManager = res.data; |
| | | this.personsList = this.personsList.concat(this.personsManager); |
| | | |
| | | //OPO专家名单 |
| | | listReportname("expert").then((res) => { |
| | | this.personsExpert = res.data; |
| | | this.personsList = this.personsList.concat(this.personsExpert); |
| | | }); |
| | | }); |
| | | }); |
| | | }); |
| | | }, |
| | | selectedTraveler() { |
| | | this.travelers.map((res) => { |
| | | |
| | | //获取一个类别的人员列表 |
| | | getPersons(row) { |
| | | //专职人员-1,协调员-2,专家-3,家属-4,其他人员-5 |
| | | let tmpList = null; |
| | | if (row.persontype == "专职人员") { |
| | | this.personsSel = this.personsZzry; |
| | | } else if (row.persontype == "协调员") { |
| | | this.personsSel = this.personsXty; |
| | | } else if (row.persontype == "专家") { |
| | | this.personsSel = this.personsExpert; |
| | | } else if (row.persontype == "家属") { |
| | | this.personsSel = tmpList; |
| | | } else if (row.persontype == "管理人员") { |
| | | this.personsSel = this.personsManager; |
| | | } |
| | | }, |
| | | |
| | | //获取设置人员账号信息 |
| | | getAccountinfo() { |
| | | this.coltravelers.map((res) => { |
| | | if (res.reportName == this.form.travelers) { |
| | | getInfoBytheUserNo(res.reportNo).then((res) => { |
| | | this.form.depositbank = res.data.depositbank; |
| | |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | //获取设置人员账号信息 |
| | | getAccountinfo2(row, personType) { |
| | | let dataArr = []; |
| | | if (personType == '专职人员') { |
| | | dataArr = this.personsZzry; |
| | | } else if (personType == '协调员') { |
| | | dataArr = this.personsXty; |
| | | } else if (personType == '专家') { |
| | | dataArr = this.personsExpert; |
| | | } else if (personType == '管理人员') { |
| | | dataArr = this.personsManager; |
| | | } |
| | | |
| | | for (let m = 0; m < dataArr.length; m++) { |
| | | if (dataArr[m].reportName == row.personname) { |
| | | row.bankname = dataArr[m].depositbank; |
| | | row.bankcardno = dataArr[m].bankcardno; |
| | | }; |
| | | } |
| | | }, |
| | | |
| | | //计算补助 |
| | | getallowance(row) { |
| | | if ( |
| | |
| | | }; |
| | | |
| | | //公杂费补助:杭州桐庐,建德,淳安60,杭州其他地区0,非杭州地区80 |
| | | if (row.destination != "") { |
| | | var str = row.destination; |
| | | if (row.destination2 != "") { |
| | | var str = row.destination2; |
| | | //验证城市 |
| | | ////if (str.indexOf("桐庐,建德,淳安") !== -1) { }; |
| | | if (str.includes("杭州")) { row.otherexpense = parseInt(row.days) * 0 } |
| | |
| | | |
| | | //计算合计 |
| | | this.sumTotalFee(); |
| | | }, |
| | | |
| | | getallowance2(row, val2) { |
| | | // this.getallowance(row); |
| | | this.arriveAddr = val2; |
| | | this.queryParams2.arriveAddr; |
| | | this.queryParams2.personType = row; |
| | | if (row.persontype != undefined && row.persontype == "协调员" || row.persontype == "管理人员") { |
| | | this.loading = true; |
| | | getSubsidy(val2).then((response) => { |
| | | this.loading = false; |
| | | row.otherexpense = response.data.others; |
| | | row.foodallowance = response.data.food; |
| | | }); |
| | | |
| | | } |
| | | }, |
| | | |
| | | getStandard(row) { |
| | |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | selcetdestination(row) { |
| | | console.log("目的地选择事件", row, row.searchAddress); |
| | | //row.searchAddress = this.searchAddress; |
| | |
| | | row.searchAddress.shi != "" && |
| | | row.searchAddress.qu != "" |
| | | ) { |
| | | row.destination = |
| | | row.destination2 = |
| | | row.searchAddress.sheng + |
| | | row.searchAddress.shi + |
| | | row.searchAddress.qu; |
| | |
| | | return area; |
| | | }, |
| | | |
| | | //获取捐献者基本信息:捐献编号、捐献者姓名 |
| | | selectbaseinfo() { |
| | | let list = this.balist; |
| | | let list = this.donatorList; |
| | | list.forEach((item) => { |
| | | if (item.id == this.form.infoid) { |
| | | // console.log('相同的',item.id,item) |
| | | this.form.donorno = item.donorno; |
| | | this.form.donorname = item.name; |
| | | } |
| | |
| | | getList() { |
| | | this.loading = true; |
| | | listReimbursement(this.queryParams).then((response) => { |
| | | console.log("差旅费数据列表:", response); |
| | | this.reimbursementList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | |
| | | }); |
| | | }, |
| | | // 取消按钮 |
| | |
| | | }, |
| | | // 表单重置 |
| | | reset() { |
| | | |
| | | this.fileList = [] |
| | | this.form = { |
| | | ceshi: {}, |
| | |
| | | costtype: null, |
| | | costtypename: null, |
| | | }; |
| | | this.applicationDetailArr = []; |
| | | this.rbDetails = []; |
| | | this.rbPayees = []; |
| | | this.resetForm("form"); |
| | | }, |
| | | // |
| | | handup(e) { |
| | | console.log("上报", e); |
| | | }, |
| | | |
| | | // 下载文件 |
| | | downFile(item) { |
| | | const url = process.env.VUE_APP_BASE_API + item.url |
| | |
| | | a.href = url; |
| | | a.dispatchEvent(event); |
| | | }, |
| | | |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | | // console.log('pop',this.value1) |
| | |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | |
| | | /** 重置按钮操作 */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | |
| | | this.single = selection.length !== 1; |
| | | this.multiple = !selection.length; |
| | | }, |
| | | |
| | | /** 新增按钮操作 */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | |
| | | this.open = true; |
| | | this.title = "新增报销申请"; |
| | | this.dialogType = "edit"; |
| | | this.fundflowList = []; |
| | | this.form.username = this.defaultperson.nickName; |
| | | this.form.userno = this.defaultperson.userName; |
| | | this.addRow(); |
| | | this.open = true; |
| | | this.title = "添加报销申请"; |
| | | this.addDetailRow(0); |
| | | this.addPayeeRow(0); |
| | | }, |
| | | |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(row) { |
| | | this.dialogType = "edit"; |
| | | this.reset(); |
| | | this.open = true; |
| | | this.title = "修改报销申请"; |
| | | |
| | | //获取报销主信息 |
| | | const id = row.id || this.ids; |
| | | getReimbursement(id).then((response) => { |
| | | this.form = response.data; |
| | | this.fileList = this.form.annexfiles ? this.form.annexfiles.split(",").map(item => ({ url: item, name: item })) : [] |
| | | this.form.recordstatus = response.data.recordstatus + ""; |
| | | this.open = true; |
| | | this.title = "修改报销申请"; |
| | | let ids = response.data.id; |
| | | |
| | | |
| | | let ids = response.data.id; |
| | | //获取报销明细信息 |
| | | getReimbursementdetaillist(ids).then((res) => { |
| | | this.applicationDetailArr = res.data; |
| | | for (let i = 0; i < this.applicationDetailArr.length; i++) { |
| | | this.applicationDetailArr[i].index = i; |
| | | this.applicationDetailArr[i].searchAddress = { |
| | | sheng: this.applicationDetailArr[i].travelprovincename, |
| | | shi: this.applicationDetailArr[i].travelcityname, |
| | | qu: this.applicationDetailArr[i].traveltownname, |
| | | this.rbDetails = res.data; |
| | | if (this.rbDetails.length==0) {this.addDetailRow(0);} |
| | | //解析出差地址 |
| | | /* |
| | | for (let i = 0; i < this.rbDetails.length; i++) { |
| | | this.rbDetails[i].index = i; |
| | | this.rbDetails[i].searchAddress = { |
| | | sheng: this.rbDetails[i].travelprovincename, |
| | | shi: this.rbDetails[i].travelcityname, |
| | | qu: this.rbDetails[i].traveltownname, |
| | | }; |
| | | } |
| | | this.sumTotalFee(); |
| | | */ |
| | | //实时合计金额 |
| | | //this.sumTotalFee(); |
| | | }); |
| | | |
| | | //获取报销打款信息 |
| | | this.queryParamsPayee.rbid=ids; |
| | | listReimbursementpayee(this.queryParamsPayee).then((res) => { |
| | | this.rbPayees = res.rows; |
| | | if (this.rbPayees.length==0) {this.addPayeeRow(0);} |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | /** 查看按钮操作 */ |
| | | handleDetail(row) { |
| | | this.dialogType = "detail"; |
| | | this.reset(); |
| | | this.title = "查看报销申请"; |
| | | |
| | | this.reset(); |
| | | this.open = true; |
| | | const id = row.id || this.ids; |
| | | |
| | | |
| | | getReimbursement(id).then((response) => { |
| | | this.form = response.data; |
| | | //附件 |
| | | this.fileList = this.form.annexfiles ? this.form.annexfiles.split(",").map(item => ({ url: item, name: item })) : [] |
| | | |
| | | //审核状态 |
| | | this.form.recordstatus = response.data.recordstatus + ""; |
| | | this.open = true; |
| | | this.title = "查看报销申请"; |
| | | |
| | | let ids = response.data.id; |
| | | let listFundflowparams = { |
| | | fundid: row.id, |
| | |
| | | listFundflow(listFundflowparams).then((res) => { |
| | | this.fundflowList = res.rows; |
| | | }); |
| | | //报销明细 |
| | | getReimbursementdetaillist(ids).then((res) => { |
| | | this.applicationDetailArr = res.data; |
| | | for (let i = 0; i < this.applicationDetailArr.length; i++) { |
| | | this.applicationDetailArr[i].index = i; |
| | | this.applicationDetailArr[i].searchAddress = { |
| | | sheng: this.applicationDetailArr[i].travelprovincename, |
| | | shi: this.applicationDetailArr[i].travelcityname, |
| | | qu: this.applicationDetailArr[i].traveltownname, |
| | | this.rbDetails = res.data; |
| | | for (let i = 0; i < this.rbDetails.length; i++) { |
| | | this.rbDetails[i].index = i; |
| | | this.rbDetails[i].searchAddress = { |
| | | sheng: this.rbDetails[i].travelprovincename, |
| | | shi: this.rbDetails[i].travelcityname, |
| | | qu: this.rbDetails[i].traveltownname, |
| | | }; |
| | | } |
| | | //this.sumTotalFee(); |
| | | }); |
| | | |
| | | //账户 |
| | | this.queryParamsPayee.rbid=ids; |
| | | listReimbursementpayee(this.queryParamsPayee).then((res) => { |
| | | this.rbPayees = res.rows; |
| | | if (this.rbPayees.length==0) {this.addPayeeRow(0);} |
| | | }); |
| | | |
| | | }); |
| | | }, |
| | | |
| | | /** 提交按钮 */ |
| | | submitForm() { |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | let indexErrTime = this.applicationDetailArr.findIndex((item) => { |
| | | if (item.endtime && item.starttime) { |
| | | let d = this.$moment(item.endtime).diff( |
| | | this.$moment(item.starttime), |
| | | "d" |
| | | ); |
| | | if (d < 0) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } else { |
| | | false; |
| | | } |
| | | }); |
| | | /** |
| | | let indexErrTime = this.rbDetails.findIndex((item) => { |
| | | if (item.endtime && item.starttime) { |
| | | let d = this.$moment(item.endtime).diff(this.$moment(item.starttime), "d"); |
| | | if (d < 0) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } else { |
| | | false; |
| | | } |
| | | }); |
| | | |
| | | if (indexErrTime > -1) { |
| | | this.$message({ |
| | | message: "第" + (indexErrTime + 1) + "行到达日期早于出发日期", |
| | | type: "warning", |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | let emptyStartTimeindex = this.rbDetails.findIndex( |
| | | (item) => item.starttime == null || item.starttime == undefined || item.starttime == "" |
| | | ); |
| | | |
| | | if (emptyStartTimeindex > -1) { |
| | | this.$message({ |
| | | message: "第" + (emptyStartTimeindex + 1) + "行出发日期为空", |
| | | type: "warning", |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | let emptyEndTimeindex = this.rbDetails.findIndex( |
| | | (item) => item.endtime == null || item.endtime == undefined || item.endtime == "" |
| | | ); |
| | | |
| | | if (emptyEndTimeindex > -1) { |
| | | this.$message({ |
| | | message: "第" + (emptyEndTimeindex + 1) + "行到达日期为空", |
| | | type: "warning", |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | if (indexErrTime > -1) { |
| | | this.$message({ |
| | | message: "第" + (indexErrTime + 1) + "行到达日期早于出发日期", |
| | | type: "warning", |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | let emptyStartTimeindex = this.applicationDetailArr.findIndex( |
| | | (item) => |
| | | item.starttime == null || |
| | | item.starttime == undefined || |
| | | item.starttime == "" |
| | | ); |
| | | |
| | | if (emptyStartTimeindex > -1) { |
| | | this.$message({ |
| | | message: "第" + (emptyStartTimeindex + 1) + "行出发日期为空", |
| | | type: "warning", |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | let emptyEndTimeindex = this.applicationDetailArr.findIndex( |
| | | (item) => |
| | | item.endtime == null || |
| | | item.endtime == undefined || |
| | | item.endtime == "" |
| | | ); |
| | | |
| | | if (emptyEndTimeindex > -1) { |
| | | this.$message({ |
| | | message: "第" + (emptyEndTimeindex + 1) + "行到达日期为空", |
| | | type: "warning", |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | //费用归属 |
| | | let belongArr = this.dict.type.sys_travelexpensebelong; |
| | | let costtypeindex = belongArr.findIndex( |
| | | (item) => this.form.costtype == item.value |
| | | ); |
| | | if (costtypeindex > -1) { |
| | | this.form.costtypename = belongArr[costtypeindex].label; |
| | | } |
| | | */ |
| | | |
| | | //附件文件处理 |
| | | let list = this.fileList; |
| | | if (list.length > 0) { |
| | | this.form.annexfiles = list.map(item => item.url).join(","); |
| | | } |
| | | if (costtypeindex > -1) { |
| | | this.form.costtypename = belongArr[costtypeindex].label; |
| | | |
| | | //校验请款金额合计是否等于报销单金额 |
| | | if (this.form.amountrequested != this.rbPayees.reduce((amount, item) => amount + Number(item.amount), 0.0)) { |
| | | this.$message({ |
| | | message: "报销请款表中合计金额不等于报销单的报销金额,请更正后再保存!", |
| | | type: "warning", |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | const rbDetails = [...this.rbDetails] |
| | | const rbPayees = [...this.rbPayees] |
| | | if (this.form.id != null) { |
| | | updateReimbursement(this.form).then((response) => { |
| | | // console.log('更新主表的信息',response); |
| | | for (let i = 0; i < this.applicationDetailArr.length; i++) { |
| | | if (this.applicationDetailArr[i].rbid != null) { |
| | | updateReimbursementdetail(this.applicationDetailArr[i]); |
| | | updateReimbursement(this.form).then((res) => { |
| | | //保存明细 |
| | | for (let i = 0; i < rbDetails.length; i++) { |
| | | if (rbDetails[i].rbid != null) { |
| | | updateReimbursementdetail(rbDetails[i]); |
| | | } else { |
| | | this.applicationDetailArr[i].rbid = this.form.id; |
| | | addReimbursementdetail(this.applicationDetailArr[i]); |
| | | //rbid关联主表Id |
| | | rbDetails[i].rbid = this.form.id; |
| | | addReimbursementdetail(rbDetails[i]); |
| | | } |
| | | } |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | this.form.recordstatus = -1; |
| | | const applicationDetailArr = [...this.applicationDetailArr] |
| | | addReimbursement(this.form).then((response) => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | console.log( |
| | | "主表新增成功了:", |
| | | response, |
| | | this.applicationDetailArr |
| | | ); |
| | | listReimbursementdetailid().then((res) => { |
| | | let id = res.data; |
| | | for (let i = 0; i < applicationDetailArr.length; i++) { |
| | | applicationDetailArr[i].rbid = id; |
| | | |
| | | addReimbursementdetail(applicationDetailArr[i]); |
| | | //保存账户 |
| | | for (let i = 0; i < rbPayees.length; i++) { |
| | | if (rbPayees[i].rbid != null) { |
| | | updateReimbursementpayee(rbPayees[i]); |
| | | } else { |
| | | //rbid关联主表Id |
| | | rbPayees[i].rbid = this.form.id; |
| | | addReimbursementpayee(rbPayees[i]); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | this.$modal.msgSuccess("修改报销单保存成功!"); |
| | | this.open = false; |
| | | this.getList(); |
| | | |
| | | }).catch(err => { |
| | | this.$modal.msgError("修改报销单保存失败!"); |
| | | }); |
| | | } |
| | | else { |
| | | this.form.recordstatus = -1; |
| | | addReimbursement(this.form).then((response) => { |
| | | //保存明细 |
| | | for (let i = 0; i < rbDetails.length; i++) { |
| | | //rbid关联主表Id |
| | | rbDetails[i].rbid = response.data; |
| | | addReimbursementdetail(rbDetails[i]); |
| | | } |
| | | |
| | | //保存账号 |
| | | for (let i = 0; i < rbPayees.length; i++) { |
| | | //rbid关联主表Id |
| | | rbPayees[i].rbid = response.data; |
| | | addReimbursementpayee(rbPayees[i]); |
| | | } |
| | | |
| | | this.$modal.msgSuccess("新增报销单保存成功!"); |
| | | this.open = false; |
| | | this.getList(); |
| | | |
| | | }).catch(err => { |
| | | this.$modal.msgError("新增报销单保存失败!"); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | |
| | | }) |
| | | .catch(() => { }); |
| | | }, |
| | | |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | const queryParams = this.queryParams; |
| | |
| | | }, |
| | | |
| | | //新增一行 |
| | | addRow(rowIndex) { |
| | | addDetailRow(rowIndex) { |
| | | let rowData = { |
| | | //index: this.applicationDetailArr.length, |
| | | //index: this.rbDetails.length, |
| | | searchAddress: { |
| | | sheng: "", |
| | | shi: "", |
| | |
| | | starttime: null, |
| | | departure: null, |
| | | endtime: null, |
| | | destination: null, |
| | | destination2: null, |
| | | days: null, |
| | | trafficexpense: 0, |
| | | traffictype: null, |
| | |
| | | uploadTime: null, |
| | | total: 0, |
| | | orderno: null, |
| | | personname2: null, |
| | | personname: null, |
| | | destination: null, |
| | | }; |
| | | if (rowIndex == undefined || rowIndex == null || rowIndex < 0) { |
| | | this.applicationDetailArr.push(rowData); |
| | | this.rbDetails.push(rowData); |
| | | } else { |
| | | this.applicationDetailArr.splice(rowIndex + 1, 0, rowData); |
| | | this.rbDetails.splice(rowIndex + 1, 0, rowData); |
| | | } |
| | | for (let i = 0; i < this.applicationDetailArr.length; i++) { |
| | | this.applicationDetailArr[i].orderno = i + 1; |
| | | for (let i = 0; i < this.rbDetails.length; i++) { |
| | | this.rbDetails[i].orderno = i + 1; |
| | | } |
| | | }, |
| | | |
| | | deleteRow(index, rows, row) { |
| | | addPayeeRow(rowIndex) { |
| | | let rowData = { |
| | | id: null, |
| | | personType: null, |
| | | personname: null, |
| | | bankname: null, |
| | | bankcardno: null, |
| | | paiddate: null, |
| | | remark: null, |
| | | orderno: null, |
| | | personname: null, |
| | | amount: null, |
| | | }; |
| | | if (rowIndex == undefined || rowIndex == null || rowIndex <= 0) { |
| | | this.rbPayees.push(rowData); |
| | | } else { |
| | | this.rbPayees.splice(rowIndex + 1, 0, rowData); |
| | | } |
| | | for (let i = 0; i < this.rbPayees.length; i++) { |
| | | this.rbPayees[i].orderno = i + 1; |
| | | } |
| | | }, |
| | | |
| | | deleteDetailRow(index, rows, row) { |
| | | this.$confirm("是否确认删除?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | |
| | | }); |
| | | }, |
| | | |
| | | deletePayeeRow(index, rows, row) { |
| | | this.$confirm("是否确认删除?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "success", |
| | | }) |
| | | .then(() => { |
| | | console.log(row); |
| | | if (row.id !== null) { |
| | | delReimbursementdetail(row.id).then((res) => { |
| | | this.$modal.msgSuccess("删除成功"); |
| | | rows.splice(index, 1); |
| | | this.recountOrderNo2(); |
| | | // this.sumTotalFee(); |
| | | }); |
| | | } else { |
| | | rows.splice(index, 1); |
| | | //this.sumTotalFee(); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | this.recountOrderNo2(); |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | //几点取消的提示 |
| | | }); |
| | | }, |
| | | //重新计算排序 |
| | | recountOrderNo() { |
| | | for (let i = 0; i < this.applicationDetailArr.length; i++) { |
| | | this.applicationDetailArr[i].orderno = i + 1; |
| | | for (let i = 0; i < this.rbDetails.length; i++) { |
| | | this.rbDetails[i].orderno = i + 1; |
| | | } |
| | | }, |
| | | //重新计算排序 |
| | | recountOrderNo2() { |
| | | for (let i = 0; i < this.rbPayees.length; i++) { |
| | | this.rbPayees[i].orderno = i + 1; |
| | | } |
| | | }, |
| | | |
| | | //上报 |
| | | handleup(row) { |
| | | console.log("rowrowrowrow", row); |
| | | |
| | | this.$confirm("是否确认将登记记录上报?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | |
| | | |
| | | //计算费用合计 |
| | | sumTotalFee() { |
| | | // debugger; |
| | | let allSum = 0; |
| | | //捐献者家属费用 |
| | | if (!isNaN(parseFloat(this.form.donoramount))) { |
| | |
| | | |
| | | //报销明细费用 |
| | | try { |
| | | for (let i = 0; i < this.applicationDetailArr.length; i++) { |
| | | for (let i = 0; i < this.rbDetails.length; i++) { |
| | | let totalFee = 0; |
| | | //计算当前报销内容费用合计 |
| | | if (!isNaN(parseFloat(this.applicationDetailArr[i].trafficexpense))) { |
| | | totalFee += parseFloat(this.applicationDetailArr[i].trafficexpense); |
| | | if (!isNaN(parseFloat(this.rbDetails[i].trafficexpense))) { |
| | | totalFee += parseFloat(this.rbDetails[i].trafficexpense); |
| | | } |
| | | if (!isNaN(parseFloat(this.applicationDetailArr[i].cityfee))) { |
| | | totalFee += parseFloat(this.applicationDetailArr[i].cityfee); |
| | | if (!isNaN(parseFloat(this.rbDetails[i].cityfee))) { |
| | | totalFee += parseFloat(this.rbDetails[i].cityfee); |
| | | } |
| | | if (!isNaN(parseFloat(this.applicationDetailArr[i].hotelexpense))) { |
| | | totalFee += parseFloat(this.applicationDetailArr[i].hotelexpense); |
| | | if (!isNaN(parseFloat(this.rbDetails[i].hotelexpense))) { |
| | | totalFee += parseFloat(this.rbDetails[i].hotelexpense); |
| | | } |
| | | if (!isNaN(parseFloat(this.applicationDetailArr[i].otherexpense))) { |
| | | totalFee += parseFloat(this.applicationDetailArr[i].otherexpense); |
| | | if (!isNaN(parseFloat(this.rbDetails[i].otherexpense))) { |
| | | totalFee += parseFloat(this.rbDetails[i].otherexpense); |
| | | } |
| | | if (!isNaN(parseFloat(this.applicationDetailArr[i].foodexpenses))) { |
| | | totalFee += parseFloat(this.applicationDetailArr[i].foodexpenses); |
| | | if (!isNaN(parseFloat(this.rbDetails[i].foodexpenses))) { |
| | | totalFee += parseFloat(this.rbDetails[i].foodexpenses); |
| | | } |
| | | if (!isNaN(parseFloat(this.applicationDetailArr[i].foodallowance))) { |
| | | totalFee += parseFloat(this.applicationDetailArr[i].foodallowance); |
| | | if (!isNaN(parseFloat(this.rbDetails[i].foodallowance))) { |
| | | totalFee += parseFloat(this.rbDetails[i].foodallowance); |
| | | } |
| | | if (!isNaN(parseFloat(this.applicationDetailArr[i].otherfeeamount))) { |
| | | totalFee += parseFloat(this.applicationDetailArr[i].otherfeeamount); |
| | | if (!isNaN(parseFloat(this.rbDetails[i].otherfeeamount))) { |
| | | totalFee += parseFloat(this.rbDetails[i].otherfeeamount); |
| | | } |
| | | this.applicationDetailArr[i].total = parseFloat(totalFee).toFixed(2); |
| | | this.$set(this.applicationDetailArr, i, this.applicationDetailArr[i]); |
| | | if (!isNaN(parseFloat(this.applicationDetailArr[i].total))) { |
| | | allSum += parseFloat(this.applicationDetailArr[i].total); |
| | | this.rbDetails[i].total = parseFloat(totalFee).toFixed(2); |
| | | this.$set(this.rbDetails, i, this.rbDetails[i]); |
| | | if (!isNaN(parseFloat(this.rbDetails[i].total))) { |
| | | allSum += parseFloat(this.rbDetails[i].total); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | getDetailArr(rbid) { |
| | | getReimbursementdetaillist(rbid).then((res) => { |
| | | this.applicationDetailArr = res.data; |
| | | for (let i = 0; i < this.applicationDetailArr.length; i++) { |
| | | this.applicationDetailArr[i].index = i; |
| | | this.applicationDetailArr[i].searchAddress = { |
| | | sheng: this.applicationDetailArr[i].travelprovincename, |
| | | shi: this.applicationDetailArr[i].travelcityname, |
| | | qu: this.applicationDetailArr[i].traveltownname, |
| | | this.rbDetails = res.data; |
| | | for (let i = 0; i < this.rbDetails.length; i++) { |
| | | this.rbDetails[i].index = i; |
| | | this.rbDetails[i].searchAddress = { |
| | | sheng: this.rbDetails[i].travelprovincename, |
| | | shi: this.rbDetails[i].travelcityname, |
| | | qu: this.rbDetails[i].traveltownname, |
| | | }; |
| | | } |
| | | this.sumTotalFee(); |
| | | }); |
| | | }, |
| | | |
| | | //金额大写 |
| | | //金额数字转换成大写 |
| | | convertCurrency(money) { |
| | | //汉字的数字 |
| | | var cnNums = new Array( |
| | | "零", |
| | | "壹", |
| | | "贰", |
| | | "叁", |
| | | "肆", |
| | | "伍", |
| | | "陆", |
| | | "柒", |
| | | "捌", |
| | | "玖" |
| | | ); |
| | | var cnNums = new Array("零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"); |
| | | //基本单位 |
| | | var cnIntRadice = new Array("", "拾", "佰", "仟"); |
| | | //对应整数部分扩展单位 |