|
<template>
|
<div class="app-container">
|
<el-form
|
:model="queryParams"
|
ref="queryForm"
|
:inline="true"
|
v-show="showSearch"
|
label-width="68px"
|
>
|
<el-row>
|
<el-col :span="6">
|
<el-form-item label="出差人" prop="travelers">
|
<el-input
|
v-model="queryParams.travelers"
|
placeholder="请输入出差人"
|
clearable
|
size="small"
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
</el-col>
|
|
<el-col :span="6">
|
<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>
|
|
<el-col :span="6">
|
<el-form-item label="审核状态" prop="recordstatus">
|
<el-input
|
v-model="queryParams.recordstatus"
|
placeholder="请选择审核状态"
|
clearable
|
size="small"
|
v-if="0"
|
@keyup.enter.native="handleQuery"
|
/>
|
<el-select
|
v-model="queryParams.recordstatus"
|
placeholder="请选择审核状态"
|
clearable
|
size="small"
|
>
|
<el-option
|
v-for="dict in dict.type.sys_recordstatus"
|
:key="dict.value"
|
:label="dict.label"
|
:value="dict.value"
|
/>
|
</el-select>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<el-row>
|
<el-col :span="8">
|
<el-form-item label="报销日期" prop="createTime">
|
<el-date-picker
|
format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
v-model="value1"
|
type="daterange"
|
@blur="onpick"
|
range-separator="至"
|
start-placeholder="报销开始日期"
|
end-placeholder="报销结束日期"
|
@keyup.enter.native="handleQuery"
|
>
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
|
<el-col :span="6">
|
<el-form-item>
|
<el-button
|
type="primary"
|
icon="el-icon-search"
|
size="mini"
|
@click="handleQuery"
|
>搜索</el-button
|
>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
>重置</el-button
|
>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
</el-form>
|
|
<el-row :gutter="10" class="mb8">
|
<el-col :span="1.5">
|
<el-button
|
type="warning"
|
plain
|
icon="el-icon-download"
|
size="mini"
|
:loading="exportLoading"
|
@click="handleExport"
|
>导出</el-button
|
>
|
</el-col>
|
<!-- v-hasPermi="['project:funddetail:export']" -->
|
<right-toolbar
|
:showSearch.sync="showSearch"
|
@queryTable="getList"
|
></right-toolbar>
|
</el-row>
|
<el-table
|
border
|
v-loading="loading"
|
:data="reimbursementList"
|
@selection-change="handleSelectionChange"
|
>
|
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
|
<el-table-column
|
label="审批状态"
|
width="120"
|
align="center"
|
prop="checkFlag"
|
>
|
<template slot-scope="scope">
|
<span v-if="scope.row.checkFlag == 0"
|
><i
|
class="el-icon-check"
|
style="color: #5fb878; font-weight: bold"
|
></i
|
></span>
|
<!-- <span v-else>待审核</span> -->
|
</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
|
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="180"
|
align="center"
|
prop="travelers"
|
>
|
</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>
|
<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> -->
|
<el-table-column
|
label="财务审核"
|
width="120"
|
align="center"
|
prop="financechecher"
|
>
|
</el-table-column>
|
<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"
|
>
|
<template slot-scope="scope">
|
<el-button
|
size="mini"
|
type="text"
|
icon="el-icon-edit"
|
v-if="scope.row.checkFlag == 1"
|
@click="handleUpdate(scope.row)"
|
>审批</el-button
|
>
|
<el-button
|
size="mini"
|
type="text"
|
icon="el-icon-edit"
|
v-if="scope.row.checkFlag == 0"
|
@click="handleShow(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>
|
<!-- v-hasPermi="['project:funddetail:edit']" -->
|
<el-button
|
size="mini"
|
type="text"
|
icon="el-icon-delete"
|
disabled
|
@click="handleDelete(scope.row)"
|
>删除</el-button
|
>
|
<!-- v-hasPermi="['project:funddetail:remove']" -->
|
</template>
|
</el-table-column>
|
</el-table>
|
<!-- v-hasPermi="['project:donateconsolationfund:edit']" -->
|
<pagination
|
v-show="total > 0"
|
:total="total"
|
:page.sync="queryParams.pageNum"
|
:limit.sync="queryParams.pageSize"
|
@pagination="getList"
|
/>
|
|
<!-- 添加或修改费用申请明细对话框 -->
|
<el-dialog
|
:title="title"
|
:visible.sync="open"
|
width="1100px"
|
append-to-body
|
>
|
<el-form ref="form" :model="form" label-width="120px">
|
<el-row>
|
<el-col :span="7">
|
<el-form-item label="捐献者" prop="infoid">
|
<el-select
|
v-model="form.infoid"
|
@change="selectbaseinfo"
|
filterable
|
disabled
|
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-col :span="8">
|
<el-form-item label="捐献编号" prop="donorno">
|
<el-input
|
disabled
|
v-model="form.donorno"
|
placeholder="捐献编号"
|
/>
|
</el-form-item>
|
</el-col>
|
<el-col :span="7">
|
<el-form-item label="申请日期" prop="createTime">
|
<el-date-picker
|
style="width: 100%"
|
v-model="form.createTime"
|
disabled
|
type="date"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
placeholder="申请日期"
|
>
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row>
|
<!-- donorname -->
|
<el-col :span="7">
|
<el-form-item label="报销人" prop="username">
|
<el-input v-model="form.username" placeholder="报销人" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="出差人" prop="travelers">
|
<el-input v-model="form.travelers" placeholder="出差人" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="7">
|
<el-form-item label="区域组长" prop="managerno">
|
<el-input v-model="form.managerno" placeholder="区域组长" />
|
</el-form-item> </el-col
|
></el-row>
|
<el-row>
|
<el-col :span="7">
|
<el-form-item label="开户银行" prop="depositbank">
|
<el-input v-model="form.depositbank" placeholder="开户银行" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="银行账号" prop="bankcardno">
|
<el-input v-model="form.bankcardno" placeholder="开户银行" />
|
</el-form-item> </el-col
|
><el-col :span="7">
|
<el-form-item label="联系电话" prop="phone">
|
<el-input v-model="form.phone" placeholder="联系电话" />
|
</el-form-item>
|
</el-col> </el-row
|
><el-row>
|
<el-col :span="21">
|
<el-form-item label="出差事由" prop="reason">
|
<el-input v-model="form.reason" placeholder="出差事由" />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="21">
|
<el-form-item label="备注" prop="remark">
|
<el-input v-model="form.remark" placeholder="专职人员 协调员" />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="8"> </el-col>
|
</el-row>
|
|
<el-row type="flex" :gutter="10" align="right" class="mb8">
|
<el-col :span="6">
|
<el-button
|
type="primary"
|
plain
|
icon="el-icon-plus"
|
size="mini"
|
disabled
|
@click="addRow"
|
>新增一行</el-button
|
>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-table :data="applicationDetailArr" border highlight-current-row>
|
<el-table-column
|
prop="starttime"
|
slot=""
|
label="出发日期"
|
align="center"
|
width="150"
|
>
|
<template slot-scope="scope">
|
<el-date-picker
|
clearable
|
size="small"
|
style="width: 100%"
|
v-model="scope.row.starttime"
|
type="date"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
placeholder="出发日期"
|
@change="getStandard(scope.row)"
|
>
|
</el-date-picker>
|
</template>
|
</el-table-column>
|
|
<el-table-column
|
prop="departure"
|
slot=""
|
label="出发地点"
|
align="center"
|
width="120"
|
>
|
<template slot-scope="scope">
|
<el-input
|
v-model="scope.row.departure"
|
placeholder="出发地点"
|
/>
|
</template>
|
</el-table-column>
|
<el-table-column
|
prop="endtime"
|
slot=""
|
label="到达日期"
|
align="center"
|
width="150"
|
>
|
<template slot-scope="scope">
|
<el-date-picker
|
clearable
|
size="small"
|
style="width: 100%"
|
v-model="scope.row.endtime"
|
type="date"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
placeholder="到达日期"
|
>
|
</el-date-picker>
|
</template>
|
</el-table-column>
|
<!-- <el-table-column
|
label="到达地点"
|
prop="destination"
|
align="center"
|
width="320"
|
>
|
<template slot-scope="scope">
|
<li_area_select
|
:ref="'residenceSelect_' + scope.row.index"
|
v-model="scope.row.searchAddress"
|
@change="selcetdestination(scope.row)"
|
></li_area_select>
|
</template>
|
</el-table-column> --><el-table-column
|
label="到达地点"
|
prop="destination"
|
align="center"
|
width="320"
|
>
|
<template slot-scope="scope">
|
<el-input
|
v-model="scope.row.destination"
|
placeholder="出发地点"
|
/>
|
</template>
|
</el-table-column>
|
<el-table-column prop="days" label="天数" width="80" align="center">
|
<template slot-scope="scope">
|
<el-input
|
v-model="scope.row.days"
|
@blur="getStandard(scope.row)"
|
placeholder="天数"
|
/>
|
</template>
|
</el-table-column>
|
<el-table-column
|
prop="traffictype"
|
label="交通工具"
|
align="center"
|
width="120"
|
>
|
<template slot-scope="scope">
|
<el-input
|
v-model="scope.row.traffictype"
|
placeholder="交通工具"
|
/>
|
</template>
|
</el-table-column>
|
<el-table-column
|
prop="trafficexpense"
|
label="交通费"
|
align="center"
|
width="100"
|
>
|
<template slot-scope="scope">
|
<el-input
|
v-model="scope.row.trafficexpense"
|
placeholder="交通费"
|
@blur="
|
(val) => {
|
sumTotalFee(scope.row);
|
}
|
"
|
/>
|
</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="
|
(val) => {
|
sumTotalFee(scope.row);
|
}
|
"
|
>{{ Number(scope.row.cityfee).toFixed(2) }}
|
</el-input>
|
</template>
|
</el-table-column>
|
<el-table-column
|
prop="hotelexpense"
|
label="住宿费"
|
align="center"
|
width="100"
|
>
|
<template slot-scope="scope">
|
<el-input
|
v-model="scope.row.hotelexpense"
|
placeholder="住宿费"
|
@blur="
|
(val) => {
|
sumTotalFee(scope.row);
|
}
|
"
|
/>
|
</template>
|
</el-table-column>
|
<el-table-column
|
prop="otherexpense"
|
label="杂费"
|
align="center"
|
width="100"
|
>
|
<template slot-scope="scope">
|
<el-input
|
v-model="scope.row.otherexpense"
|
placeholder="杂费"
|
@blur="
|
(val) => {
|
sumTotalFee(scope.row);
|
}
|
"
|
/>
|
</template>
|
</el-table-column>
|
<el-table-column
|
prop="foodexpenses"
|
label="伙食费报销"
|
align="center"
|
width="100"
|
>
|
<template slot-scope="scope">
|
<el-input
|
v-model="scope.row.foodexpenses"
|
placeholder="伙食费报销"
|
@blur="
|
(val) => {
|
sumTotalFee(scope.row);
|
}
|
"
|
/>
|
</template>
|
</el-table-column>
|
<el-table-column
|
prop="foodallowance"
|
label="伙食费补助"
|
align="center"
|
width="100"
|
>
|
<template slot-scope="scope">
|
<el-input
|
v-model="scope.row.foodallowance"
|
placeholder="伙食费补助"
|
@blur="
|
(val) => {
|
sumTotalFee(scope.row);
|
}
|
"
|
/>
|
</template> </el-table-column
|
><el-table-column
|
prop="otherfeeamount"
|
label="其他费用"
|
align="center"
|
width="100"
|
>
|
<template slot-scope="scope">
|
<el-input
|
v-model="scope.row.otherfeeamount"
|
placeholder="其他费用"
|
@blur="
|
(val) => {
|
sumTotalFee(scope.row);
|
}
|
"
|
/>
|
</template>
|
</el-table-column>
|
<el-table-column
|
prop="departure"
|
slot=""
|
label="其他费用说明"
|
align="center"
|
width="120"
|
>
|
<template slot-scope="scope">
|
<el-input
|
v-model="scope.row.otherfeedesc"
|
placeholder="其他费用说明"
|
/>
|
</template>
|
</el-table-column>
|
<el-table-column
|
prop="total"
|
label="合计"
|
align="center"
|
width="140"
|
>
|
<template slot-scope="scope">
|
<el-input v-model="scope.row.total" placeholder="合计" />
|
</template>
|
</el-table-column>
|
<el-table-column
|
fixed="right"
|
label="操作"
|
align="center"
|
width="120"
|
>
|
<!-- deleteRow(scope.$index, applicationDetailArr) -->
|
|
<template slot-scope="scope">
|
<el-button
|
@click.native.prevent="
|
deleteRow(scope.$index, applicationDetailArr, scope.row)
|
"
|
type="text"
|
size="small"
|
disabled
|
>
|
删除
|
</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
</el-row>
|
|
<el-row style="margin-top: 10px">
|
<el-col :span="6">
|
<el-form-item label="报销合计" prop="amountrequested">
|
<el-input v-model="form.amountrequested" placeholder="报销合计" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="6">
|
<el-form-item label="领款金额" prop="amountrequested">
|
<el-input v-model="form.amountrequested" placeholder="领款金额" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="6">
|
<el-form-item label="大写" prop="bigstrmoney">
|
<el-input v-model="form.bigstrmoney" placeholder="领款金额" />
|
</el-form-item>
|
</el-col>
|
<!-- <el-col :span="6">
|
<el-form-item label="审核意见" prop="recordstatus">
|
<el-input v-model="form.recordstatus" placeholder="审核意见" />
|
</el-form-item>
|
</el-col> -->
|
</el-row>
|
<el-row>
|
<el-col :span="6">
|
<el-form-item label="中心负责人" prop="opochecker">
|
<el-input v-model="form.opochecker" placeholder="中心负责人" />
|
</el-form-item>
|
</el-col>
|
|
<el-col :span="6">
|
<el-form-item label="财务副院长" prop="finvicepresident">
|
<el-input
|
v-model="form.finvicepresident"
|
placeholder="财务副院长"
|
/>
|
</el-form-item>
|
</el-col>
|
<el-col :span="6">
|
<el-form-item label="业务副院长" prop="busvicepresident">
|
<el-input
|
v-model="form.busvicepresident"
|
placeholder="业务副院长"
|
/>
|
</el-form-item> </el-col></el-row
|
><el-row>
|
<el-col :span="6">
|
<el-form-item label="办公室主任" prop="officedirector">
|
<el-input
|
v-model="form.officedirector"
|
placeholder="办公室主任"
|
/>
|
</el-form-item>
|
</el-col>
|
<el-col :span="6">
|
<el-form-item label="财务部主任" prop="financedirector">
|
<el-input
|
v-model="form.financedirector"
|
placeholder="财务部主任"
|
/>
|
</el-form-item>
|
</el-col>
|
<el-col :span="6">
|
<el-form-item label="财务审核" prop="financechecher">
|
<el-input v-model="form.financechecher" placeholder="财务审核" />
|
</el-form-item> </el-col
|
></el-row>
|
</el-form>
|
<el-form label-width="120px">
|
<el-table :data="fundflowList" border>
|
<el-table-column
|
label="审核人"
|
align="center"
|
width="120"
|
prop="checkusername"
|
/>
|
<el-table-column
|
label="审核日期"
|
align="center"
|
width="160"
|
prop="createTime"
|
/>
|
<el-table-column
|
label="审核结果"
|
align="center"
|
width="200"
|
prop="flowconclusion"
|
><template slot-scope="scope"
|
><span v-if="scope.row.flowconclusion == 1">通过</span
|
><span v-if="scope.row.flowconclusion == 2"
|
>不通过</span
|
></template
|
>
|
</el-table-column>
|
<el-table-column label="审核备注" align="center" prop="flowcontent" />
|
</el-table>
|
|
<el-row style="margin-top: 25px; margin-bottom: 5px" v-if="dialogType=='edit'">
|
<el-col :span="7">
|
<el-form-item label="审核结果" align="left">
|
<el-radio-group v-model="newobj.flowlevelone" align="left">
|
<el-radio label="1">通过</el-radio>
|
<el-radio label="2">不通过</el-radio>
|
</el-radio-group>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row v-if="dialogType=='edit'">
|
<el-col :span="17">
|
<el-form-item label="审核备注" align="left">
|
<el-input v-model="newobj.flowconclusion" placeholder="备注" />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
</el-form>
|
<div slot="footer" class="dialog-footer">
|
<el-button type="primary" @click="checksubmit" v-if="dialogType=='edit'">保 存</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
</div>
|
</el-dialog>
|
</div>
|
</template>
|
|
<script>
|
import { listDonatebaseinfo } from "@/api/project/donatebaseinfo";
|
import {
|
listReimbursement,
|
getReimbursement,
|
delReimbursement,
|
addReimbursement,
|
updateReimbursement,
|
exportReimbursement,
|
getdownload,
|
//获取地市对应基准金额
|
getstandardRMB,
|
checkfund,
|
listbypowerone,
|
} from "@/api/project/reimbursement";
|
import {
|
provinceAndCityData,
|
regionData,
|
provinceAndCityDataPlus,
|
regionDataPlus,
|
CodeToText,
|
TextToCode,
|
} from "element-china-area-data";
|
import {
|
listFundflow,
|
getFundflow,
|
delFundflow,
|
addFundflow,
|
updateFundflow,
|
exportFundflow,
|
} from "@/api/project/fundflow";
|
import {
|
listReimbursementdetail,
|
getReimbursementdetail,
|
addReimbursementdetail,
|
updateReimbursementdetail,
|
listReimbursementdetailid,
|
getReimbursementdetaillist,
|
delReimbursementdetail,
|
delReimbursementdetailrbid,
|
exportReimbursementdetail,
|
getTravelStandard,
|
} from "@/api/project/reimbursementdetail";
|
import Li_area_select from "@/components/Address";
|
import { getUserProfile } from "@/api/system/user";
|
|
export default {
|
components: {
|
Li_area_select,
|
},
|
name: "Funddetail",
|
dicts: [
|
"sys_recordstatus",
|
"sys_finsubject",
|
"sys_0_1",
|
"sys_fund_type",
|
"sys_financeitemtype",
|
"sys_travelexpensebelong",
|
],
|
data() {
|
return {
|
newobj: {
|
flowlevelone: null,
|
flowconclusion: null,
|
fundid: null,
|
},
|
fundflowList: [],
|
checkopen: false,
|
options: regionDataPlus,
|
selectedOptions: [],
|
searchAddress: {
|
sheng: "",
|
shi: "",
|
qu: "",
|
},
|
value1: "",
|
// 遮罩层
|
loading: true,
|
// 导出遮罩层
|
exportLoading: false,
|
// 选中数组
|
ids: [],
|
// 非单个禁用
|
single: true,
|
// 非多个禁用
|
multiple: true,
|
// 显示搜索条件
|
showSearch: true,
|
// 总条数
|
total: 0,
|
// 费用申请明细表格数据
|
funddetailList: [],
|
// 弹出层标题
|
title: "",
|
// 是否显示弹出层
|
open: false,
|
checkFlagOptions: [
|
{
|
value: 0,
|
label: "已审批",
|
},
|
{
|
value: 1,
|
label: "待审批",
|
},
|
{
|
value: 2,
|
label: "全部",
|
},
|
],
|
// 查询参数
|
queryParams: {
|
pageNum: 1,
|
pageSize: 10,
|
APPLICANT: null,
|
APPLICATIONBEGTIME: null,
|
APPLICATIONENDTIME: null,
|
CHECKFLAG: 1,
|
},
|
// 表单参数
|
form: {},
|
reimbursementList: [],
|
// 表单校验
|
rules: {},
|
//费用申请单form
|
applicationForm: {
|
applicationType: null,
|
donorno: null,
|
donorname: null,
|
bigstrmoney: null,
|
},
|
applicationDetailArr: [],
|
baselist: [],
|
balist: [],
|
standardlevel: 0,
|
createTime: [],
|
//弹窗详情--show;edit
|
dialogType: "show",
|
};
|
},
|
created() {
|
this.getList();
|
},
|
mounted() {
|
this.getlistDonatebaseinfo();
|
this.getList();
|
},
|
methods: {
|
selectapplication() {
|
console.log("时间", this.createTime);
|
this.queryParams.APPLICATIONBEGTIME = this.createTime[0];
|
this.queryParams.APPLICATIONENDTIME = this.createTime[1];
|
},
|
getList() {
|
this.loading = true;
|
listbypowerone(this.queryParams).then((response) => {
|
console.log("差旅费数据列表:", response);
|
debugger;
|
this.reimbursementList = response.rows;
|
this.total = response.total;
|
this.loading = false;
|
});
|
},
|
getgetUserProfile() {
|
getUserProfile().then((response) => {
|
this.standardlevel = response.data.standardlevel;
|
});
|
},
|
getlistDonatebaseinfo() {
|
listDonatebaseinfo().then((res) => {
|
let list = res.rows;
|
let baseinfolist = [];
|
this.balist = list;
|
list.forEach((element) => {
|
baseinfolist.push({
|
infoid: element.id,
|
name: element.name,
|
});
|
});
|
console.log("组合的新数组", baseinfolist);
|
if (baseinfolist != 0) {
|
this.baselist = baseinfolist;
|
console.log("11111111", this.baselist);
|
}
|
});
|
},
|
checksubmit() {
|
console.log("formformform", this.newobj);
|
let checkfundobj = {
|
flowconclusion: this.newobj.flowlevelone,
|
flowcontent: this.newobj.flowconclusion,
|
fundid: this.newobj.fundid,
|
};
|
if (
|
checkfundobj.flowconclusion == null ||
|
checkfundobj.flowconclusion == undefined ||
|
checkfundobj.flowconclusion == ""
|
) {
|
this.$modal.msgError("请选择审核结论!");
|
return;
|
}
|
checkfund(checkfundobj).then((res) => {
|
this.reset();
|
this.open=false;
|
this.getList();
|
this.$modal.msgSuccess("审核完成!");
|
|
});
|
},
|
getStandard(row) {
|
if (
|
row.searchAddress.sheng != "" &&
|
row.searchAddress.shi != "" &&
|
row.searchAddress.qu != "" &&
|
row.starttime != "" &&
|
row.starttime != null &&
|
row.days != ""
|
) {
|
//计算住宿费
|
let info = {
|
pabegindate: this.$moment(row.starttime).format("YYYY-MM-DD"),
|
pacitycode: this.$refs["residenceSelect_" + row.index].getShi(),
|
paenddate: this.$moment(row.starttime)
|
.add(row.days, "day")
|
.format("YYYY-MM-DD"),
|
paprovincecode: this.$refs["residenceSelect_" + row.index].getSheng(),
|
patowncode: this.$refs["residenceSelect_" + row.index].getQu(),
|
standardlevel: this.standardlevel,
|
};
|
getTravelStandard(info)
|
.then((response) => {
|
let fee = 0;
|
for (let i = 0; i < response.data.length; i++) {
|
fee += response.data[i].reimbursementamout;
|
}
|
row.hotelexpense = fee;
|
})
|
.finally(() => {
|
this.sumTotalFee(row);
|
});
|
}
|
},
|
selcetdestination(row) {
|
console.log("目的地选择事件", row, row.searchAddress);
|
//row.searchAddress = this.searchAddress;
|
if (
|
row.searchAddress.sheng != "" &&
|
row.searchAddress.shi != "" &&
|
row.searchAddress.qu != ""
|
) {
|
row.destination =
|
row.searchAddress.sheng +
|
row.searchAddress.shi +
|
row.searchAddress.qu;
|
row.travelprovincename = row.searchAddress.sheng;
|
row.travelprovince =
|
this.$refs["residenceSelect_" + row.index].getSheng();
|
row.travelcityname = row.searchAddress.shi;
|
row.travelcity = this.$refs["residenceSelect_" + row.index].getShi();
|
row.traveltownname = row.searchAddress.qu;
|
row.traveltown = this.$refs["residenceSelect_" + row.index].getQu();
|
this.getStandard(row);
|
}
|
},
|
getCityData(e) {
|
console.log("dwadwadwadawda", e, this.selectedOptions);
|
let a = this.getCodeToText(this.selectedOptions);
|
e.destination = a;
|
console.log("得到的地市", e.destination);
|
},
|
getCodeToText(codeArray) {
|
let area = "";
|
switch (codeArray.length) {
|
case 1:
|
area += CodeToText[codeArray[0]];
|
break;
|
case 2:
|
area += CodeToText[codeArray[0]] + "/" + CodeToText[codeArray[1]];
|
break;
|
case 3:
|
area +=
|
CodeToText[codeArray[0]] +
|
"/" +
|
CodeToText[codeArray[1]] +
|
"/" +
|
CodeToText[codeArray[2]];
|
break;
|
default:
|
break;
|
}
|
return area;
|
},
|
selectbaseinfo() {
|
console.log("infoid", this.form.infoid);
|
let list = this.balist;
|
list.forEach((item) => {
|
if ((item.id = this.form.infoid)) {
|
// console.log('相同的',item.id,item)
|
this.form.donorno = item.donorno;
|
this.form.donorname = item.name;
|
}
|
});
|
},
|
onpick(e) {
|
// console.log(e,this.value1)
|
},
|
gettable(e) {
|
const id = e.id;
|
getdownload(e.id).then((res) => {
|
var fileUrl = res;
|
//获取当前网址
|
var urlBase = process.env.VUE_APP_BASE_API;
|
var curWWWPath = window.document.location.href;
|
var pos = curWWWPath.indexOf(window.document.location.pathname);
|
// 创建a标签
|
var aEle = document.createElement("a");
|
aEle.href =
|
curWWWPath.substring(0, pos) + urlBase + fileUrl["downloadUrl"];
|
aEle.click();
|
});
|
},
|
/** 查询报销申请列表 */
|
|
// 取消按钮
|
cancel() {
|
this.open = false;
|
this.reset();
|
},
|
// 表单重置
|
reset() {
|
this.form = {
|
bigstrmoney: null,
|
id: null,
|
delFlag: null,
|
createBy: null,
|
createTime: null,
|
updateBy: null,
|
updateTime: null,
|
UserNo: null,
|
username: null,
|
idcardtype: null,
|
idcardno: null,
|
phone: null,
|
depositbank: null,
|
bankcardno: null,
|
branchbankname: null,
|
annexbankcard: null,
|
annexfiles: null,
|
amountrequested: null,
|
prepaidamount: null,
|
invoicecount: null,
|
attachcount: null,
|
managerno: null,
|
managername: null,
|
deptmentno: null,
|
deptmentname: null,
|
opochecker: null,
|
finvicepresident: null,
|
busvicepresident: null,
|
officedirector: null,
|
financedirector: null,
|
financechecher: null,
|
infoid: null,
|
donorno: null,
|
bigstrmoney: null,
|
remark: null,
|
recordstatus: "0",
|
uploadflag: null,
|
uploadtime: null,
|
};
|
this.applicationDetailArr = [
|
{
|
index: 0,
|
searchAddress: {
|
sheng: "",
|
shi: "",
|
qu: "",
|
},
|
id: null,
|
rbid: null,
|
starttime: null,
|
departure: null,
|
endtime: null,
|
destination: null,
|
days: null,
|
trafficexpense: 0,
|
traffictype: null,
|
cityfee: 0,
|
hotelexpense: 0,
|
invoicecount: null,
|
attachcount: null,
|
otherexpense: 0,
|
foodexpenses: 0,
|
foodallowance: 0,
|
annexfiles: null,
|
remark: null,
|
createBy: null,
|
createTime: null,
|
updatetime: null,
|
uploadTime: null,
|
uploadFlag: null,
|
uploadFlag: null,
|
total: 0,
|
},
|
];
|
this.resetForm("form");
|
},
|
//
|
handup(e) {
|
console.log("上报", e);
|
},
|
tojust(row) {
|
console.log("row", row);
|
this.checkopen = true;
|
this.newobj.fundid = row;
|
console.log("111111", this.newobj.fundid);
|
// this.newobj.fundid=row.id;
|
let listFundflowparams = {
|
// fundid:row.id,
|
fundid: 75,
|
fundtype: 1,
|
};
|
listFundflow(listFundflowparams).then((res) => {
|
console.log(" fundtype: 1", res);
|
this.fundflowList = res.rows;
|
});
|
},
|
/** 搜索按钮操作 */
|
handleQuery() {
|
// console.log('pop',this.value1)
|
this.queryParams.pageNum = 1;
|
this.getList();
|
},
|
/** 重置按钮操作 */
|
resetQuery() {
|
this.resetForm("queryForm");
|
this.handleQuery();
|
},
|
// 多选框选中数据
|
handleSelectionChange(selection) {
|
this.ids = selection.map((item) => item.id);
|
this.single = selection.length !== 1;
|
this.multiple = !selection.length;
|
},
|
/** 新增按钮操作 */
|
handleAdd() {
|
this.reset();
|
//获取当前的申报明细
|
//……
|
//判断为无数据时新增一行空数据
|
this.open = true;
|
this.title = "添加报销申请";
|
},
|
/** 修改按钮操作 */
|
handleUpdate(row) {
|
this.dialogType = "edit";
|
const id = row.id || this.ids;
|
this.newobj.fundid = id;
|
let listFundflowparams = {
|
fundid: row.id,
|
fundtype: 1,
|
};
|
listFundflow(listFundflowparams).then((res) => {
|
this.fundflowList = res.rows;
|
});
|
this.reset();
|
debugger
|
getReimbursement(id).then((response1) => {
|
this.form = response1.data;
|
console.log(this.form);
|
console.log(response1.data);
|
this.open = true;
|
this.title = "修改报销申请";
|
let ids = response1.data.id;
|
getReimbursementdetaillist(ids).then((res2) => {
|
console.log("修改的details数据", res2);
|
this.applicationDetailArr = res2.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.sumTotalFee();
|
});
|
});
|
},
|
//查看审核详情
|
handleShow(row) {
|
this.dialogType = "show";
|
//加载审核记录
|
let listFundflowparams = {
|
fundid: row.id,
|
fundtype: 1,
|
};
|
listFundflow(listFundflowparams).then((res) => {
|
this.fundflowList = res.rows;
|
});
|
getReimbursement(row.id).then((response) => {
|
this.form = response.data;
|
this.open = true;
|
this.title = "查看报销申请";
|
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.sumTotalFee();
|
});
|
});
|
},
|
/** 提交按钮 */
|
submitForm() {
|
this.$refs["form"].validate((valid) => {
|
if (valid) {
|
// this.applicationDetailArr.forEach(item=>{
|
// item.destination = this.searchAddress.sheng
|
// })
|
|
if (this.form.id != null) {
|
console.log("大写", this.form.bigstrmoney);
|
updateReimbursement(this.form).then((response) => {
|
// console.log('更新主表的信息',response);
|
for (let i = 0; i < this.applicationDetailArr.length; i++) {
|
console.log("你好", this.applicationDetailArr[i].rbid);
|
if (this.applicationDetailArr[i].rbid != null) {
|
updateReimbursementdetail(this.applicationDetailArr[i]);
|
} else {
|
console.log("修改时新增的id", this.form.id);
|
this.applicationDetailArr[i].rbid = this.form.id;
|
addReimbursementdetail(this.applicationDetailArr[i]);
|
}
|
}
|
this.$modal.msgSuccess("修改成功");
|
this.open = false;
|
this.getList();
|
});
|
} else {
|
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 < this.applicationDetailArr.length; i++) {
|
this.applicationDetailArr[i].rbid = id;
|
addReimbursementdetail(this.applicationDetailArr[i]);
|
}
|
console.log("idaaaaaa:", res);
|
});
|
//details新增
|
|
// applicationDetailArr
|
});
|
}
|
}
|
});
|
},
|
/** 删除按钮操作 */
|
handleDelete(row) {
|
const ids = row.id || this.ids;
|
this.$modal
|
.confirm('是否确认删除报销申请编号为"' + ids + '"的数据项?')
|
.then(function () {
|
// 删除details内的数据
|
return delReimbursement(ids);
|
})
|
.then(() => {
|
delReimbursementdetailrbid(ids);
|
this.getList();
|
this.$modal.msgSuccess("删除成功");
|
})
|
.catch(() => {});
|
},
|
/** 导出按钮操作 */
|
handleExport() {
|
const queryParams = this.queryParams;
|
this.$modal
|
.confirm("是否确认导出所有报销申请数据项?")
|
.then(() => {
|
this.exportLoading = true;
|
return exportReimbursement(queryParams);
|
})
|
.then((response) => {
|
this.$download.name(response.msg);
|
this.exportLoading = false;
|
})
|
.catch(() => {});
|
},
|
|
//新增一行
|
addRow() {
|
let rowData = {
|
index: this.applicationDetailArr.length,
|
searchAddress: {
|
sheng: "",
|
shi: "",
|
qu: "",
|
},
|
id: null,
|
rbid: null,
|
starttime: null,
|
departure: null,
|
endtime: null,
|
destination: null,
|
days: null,
|
trafficexpense: 0,
|
traffictype: null,
|
cityfee: 0,
|
hotelexpense: 0,
|
invoicecount: null,
|
attachcount: null,
|
otherexpense: 0,
|
foodexpenses: 0,
|
foodallowance: 0,
|
annexfiles: null,
|
remark: null,
|
delFlag: null,
|
createBy: null,
|
createTime: null,
|
updateBy: null,
|
updateTime: null,
|
uploadFlag: null,
|
uploadTime: null,
|
total: 0,
|
};
|
this.applicationDetailArr.push(rowData);
|
},
|
|
deleteRow(index, rows, row) {
|
// console.log('rows',rows)
|
|
this.$confirm("是否确认删除?", "提示", {
|
confirmButtonText: "确定",
|
cancelButtonText: "取消",
|
type: "warning",
|
})
|
.then(() => {
|
rows.splice(index, 1);
|
console.log("rows", rows);
|
})
|
.catch(() => {
|
//几点取消的提示
|
});
|
},
|
|
//计算费用合计
|
sumTotalFee(scope) {
|
// debugger;
|
let allSum = 0;
|
try {
|
for (let i = 0; i < this.applicationDetailArr.length; i++) {
|
let totalFee = 0;
|
//计算当前报销内容费用合计
|
if (!isNaN(parseFloat(this.applicationDetailArr[i].trafficexpense))) {
|
totalFee += parseFloat(this.applicationDetailArr[i].trafficexpense);
|
}
|
if (!isNaN(parseFloat(this.applicationDetailArr[i].cityfee))) {
|
totalFee += parseFloat(this.applicationDetailArr[i].cityfee);
|
}
|
if (!isNaN(parseFloat(this.applicationDetailArr[i].hotelexpense))) {
|
totalFee += parseFloat(this.applicationDetailArr[i].hotelexpense);
|
}
|
if (!isNaN(parseFloat(this.applicationDetailArr[i].otherexpense))) {
|
totalFee += parseFloat(this.applicationDetailArr[i].otherexpense);
|
}
|
if (!isNaN(parseFloat(this.applicationDetailArr[i].foodexpenses))) {
|
totalFee += parseFloat(this.applicationDetailArr[i].foodexpenses);
|
}
|
if (!isNaN(parseFloat(this.applicationDetailArr[i].foodallowance))) {
|
totalFee += parseFloat(this.applicationDetailArr[i].foodallowance);
|
}
|
if (!isNaN(parseFloat(this.applicationDetailArr[i].otherfeeamount))) {
|
totalFee += parseFloat(this.applicationDetailArr[i].otherfeeamount);
|
}
|
this.applicationDetailArr[i].total = parseFloat(totalFee).toFixed(2);
|
this.$set(
|
this.applicationDetailArr,
|
scope.$index,
|
this.applicationDetailArr[i]
|
);
|
if (!isNaN(parseFloat(this.applicationDetailArr[i].total))) {
|
allSum += parseFloat(this.applicationDetailArr[i].total);
|
}
|
}
|
this.form.amountrequested = allSum.toFixed(2);
|
this.form.bigstrmoney = this.convertCurrency(this.form.amountrequested);
|
} catch {}
|
},
|
|
//金额大写
|
convertCurrency(money) {
|
//汉字的数字
|
var cnNums = new Array(
|
"零",
|
"壹",
|
"贰",
|
"叁",
|
"肆",
|
"伍",
|
"陆",
|
"柒",
|
"捌",
|
"玖"
|
);
|
//基本单位
|
var cnIntRadice = new Array("", "拾", "佰", "仟");
|
//对应整数部分扩展单位
|
var cnIntUnits = new Array("", "万", "亿", "兆");
|
//对应小数部分单位
|
var cnDecUnits = new Array("角", "分", "毫", "厘");
|
//整数金额时后面跟的字符
|
var cnInteger = "整";
|
//整型完以后的单位
|
var cnIntLast = "元";
|
//最大处理的数字
|
var maxNum = 999999999999999.9999;
|
//金额整数部分
|
var integerNum;
|
//金额小数部分
|
var decimalNum;
|
//输出的中文金额字符串
|
var chineseStr = "";
|
//分离金额后用的数组,预定义
|
var parts;
|
if (money == "") {
|
return "";
|
}
|
money = parseFloat(money);
|
if (money >= maxNum) {
|
//超出最大处理数字
|
return "";
|
}
|
if (money == 0) {
|
chineseStr = cnNums[0] + cnIntLast + cnInteger;
|
return chineseStr;
|
}
|
//转换为字符串
|
money = money.toString();
|
if (money.indexOf(".") == -1) {
|
integerNum = money;
|
decimalNum = "";
|
} else {
|
parts = money.split(".");
|
integerNum = parts[0];
|
decimalNum = parts[1].substr(0, 4);
|
}
|
//获取整型部分转换
|
if (parseInt(integerNum, 10) > 0) {
|
var zeroCount = 0;
|
var IntLen = integerNum.length;
|
for (var i = 0; i < IntLen; i++) {
|
var n = integerNum.substr(i, 1);
|
var p = IntLen - i - 1;
|
var q = p / 4;
|
var m = p % 4;
|
if (n == "0") {
|
zeroCount++;
|
} else {
|
if (zeroCount > 0) {
|
chineseStr += cnNums[0];
|
}
|
//归零
|
zeroCount = 0;
|
chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
|
}
|
if (m == 0 && zeroCount < 4) {
|
chineseStr += cnIntUnits[q];
|
}
|
}
|
chineseStr += cnIntLast;
|
}
|
//小数部分
|
if (decimalNum != "") {
|
var decLen = decimalNum.length;
|
for (var i = 0; i < decLen; i++) {
|
var n = decimalNum.substr(i, 1);
|
if (n != "0") {
|
chineseStr += cnNums[Number(n)] + cnDecUnits[i];
|
}
|
}
|
}
|
if (chineseStr == "") {
|
chineseStr += cnNums[0] + cnIntLast + cnInteger;
|
} else if (decimalNum == "") {
|
chineseStr += cnInteger;
|
}
|
return chineseStr;
|
},
|
},
|
};
|
</script>
|