1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141 |
- <template>
- <el-row class="app-container zap-main">
- <el-row v-if="activeIndex === '0'" class="zap-table-search">
- <el-row style="padding-top: 16px;">
- <right-toolbar
- class="zap-right-toolbar"
- :showSearch.sync="showSearch"
- @queryTable="getList"
- >收起</right-toolbar>
- <span class="zap-table-search__title">所选条件:</span>
- <div style="float: right;margin-right:1%">
- <el-button type="cyan" icon="el-icon-search" @click="handleQuery">搜索</el-button>
- <el-button icon="el-icon-refresh" @click="resetQuery" style="float: ;">重置00</el-button>
- <column-setting
- class="zap-column-setting"
- :checkList="checkList"
- :tableList="tableList"
- :selfDom="selfDom"
- :tableId="tableId"
- ></column-setting>
- </div>
- <hr style="margin-top: 16px;" />
- <el-form
- :model="queryParams"
- ref="queryForm"
- :inline="true"
- v-show="showSearch"
- label-width="auto"
- >
- <el-form-item label="融资编号" prop="zfrNumber" size="large">
- <el-input
- maxlength="30"
- v-model="queryParams.zfrNumber"
- placeholder="请输入融资编号"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="开立企业" prop="coreScyName" size="large">
- <el-input
- maxlength="30"
- v-model="queryParams.coreScyName"
- placeholder="请输入开立企业名称"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="融资企业" prop="supScyName" size="large">
- <el-input
- maxlength="30"
- v-model="queryParams.supScyName"
- placeholder="请输入融资企业名称"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="融资状态" prop="zfrStatus" size="large">
- <el-select v-model="queryParams.zfrStatus" placeholder="融资状态" clearable>
- <el-option
- v-for="dict in zfrStatusOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="费用状态" prop="zciStatus" size="large">
- <el-select v-model="queryParams.zciStatus" placeholder="费用状态" clearable>
- <el-option
- v-for="dict in zciStatusOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="发票状态" prop="zciInvoiceStatus" size="large">
- <el-select v-model="queryParams.zciInvoiceStatus" placeholder="发票状态" clearable>
- <el-option
- v-for="dict in invoiceStatusOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="创建时间" size="large">
- <el-date-picker
- v-model="dateRange"
- value-format="yyyy-MM-dd"
- type="daterange"
- range-separator="-"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- ></el-date-picker>
- </el-form-item>
- </el-form>
- </el-row>
- </el-row>
- <el-row v-if="activeIndex === '1'" class="zap-table-search">
- <el-row style="padding-top: 16px;">
- <right-toolbar
- class="zap-right-toolbar"
- :showSearch.sync="showSearch"
- @queryTable="getInvoice"
- >收起</right-toolbar>
- <span class="zap-table-search__title">所选条件:</span>
- <div style="float: right;margin-right:1%">
- <el-button type="cyan" icon="el-icon-search" @click="handleInvoiceQuery">搜索</el-button>
- <el-button icon="el-icon-refresh" @click="resetInvoiceQuery" style="float: ;">重置</el-button>
- <column-setting
- class="zap-column-setting"
- :checkList="checkList"
- :tableList="tableList"
- :selfDom="selfDom"
- :tableId="tableId"
- ></column-setting>
- </div>
- <hr style="margin-top: 16px;" />
- <el-form
- :model="invoiceParams"
- ref="queryInvoiceForm"
- :inline="true"
- v-show="showSearch"
- label-width="auto"
- >
- <el-form-item label="融资编号" prop="zfrNumber" size="large">
- <el-input
- maxlength="30"
- v-model="invoiceParams.zfrNumber"
- placeholder="请输入融资编号"
- clearable
- @keyup.enter.native="handleInvoiceQuery"
- />
- </el-form-item>
- <el-form-item label="开立企业" prop="coreScyName" size="large">
- <el-input
- maxlength="30"
- v-model="invoiceParams.coreScyName"
- placeholder="请输入开立企业名称"
- clearable
- @keyup.enter.native="handleInvoiceQuery"
- />
- </el-form-item>
- <el-form-item label="融资企业" prop="supScyName" size="large">
- <el-input
- maxlength="30"
- v-model="invoiceParams.supScyName"
- placeholder="请输入融资企业名称"
- clearable
- @keyup.enter.native="handleInvoiceQuery"
- />
- </el-form-item>
- <el-form-item label="创建时间" size="large">
- <el-date-picker
- v-model="dateInvoiceRange"
- size="small"
- style="width: 225px"
- value-format="yyyy-MM-dd"
- type="daterange"
- range-separator="-"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- ></el-date-picker>
- </el-form-item>
- </el-form>
- </el-row>
- </el-row>
- <!-- ________________________________________平台用________________________________________________ -->
- <el-row class="zap-form zap-margin-top">
- <el-tabs v-model="activeIndex">
- <el-tab-pane label="费用列表">
- <div class="zap-content">
- <el-button
- type="warning"
- @click="handleExport"
- v-hasPermi="['service:cost:export']"
- :disabled="total == 0"
- >导出</el-button>
- </div>
- <el-table v-loading="loading" :data="costList" stripe>
- <el-table-column label="序号" type="index" width="50" align="center">
- <template slot-scope="scope">
- <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="融资编号"
- align="center"
- prop="zfrNumber"
- v-if="uncheckList.zfrNumber"
- />
- <el-table-column
- label="融资企业"
- align="center"
- prop="supScyName"
- v-if="uncheckList.supScyName"
- />
- <el-table-column
- label="开立企业"
- align="center"
- prop="coreScyName"
- v-if="uncheckList.coreScyName"
- show-overflow-tooltip
- />
- <el-table-column
- label="融资产品"
- align="center"
- prop="zfpName"
- v-if="uncheckList.zfpName"
- show-overflow-tooltip
- />
- <el-table-column
- label="融资金额"
- align="center"
- prop="zfrAmount"
- :formatter="moneyFormat"
- v-if="uncheckList.zfrAmount"
- show-overflow-tooltip
- />
- <el-table-column
- label="融资状态"
- align="center"
- prop="zfrStatus"
- :formatter="zfrStatusFormat"
- v-if="uncheckList.zfrStatus"
- show-overflow-tooltip
- />
- <el-table-column
- label="费用状态"
- align="center"
- prop="zciStatus"
- :formatter="zciStatusFormat"
- v-if="uncheckList.zciStatus"
- show-overflow-tooltip
- />
- <el-table-column
- label="创建时间"
- align="center"
- prop="createTime"
- v-if="uncheckList.createTime"
- show-overflow-tooltip
- />
- <el-table-column
- label="手续费"
- align="center"
- prop="zciAmount"
- :formatter="moneyFormat"
- v-if="uncheckList.zciAmount "
- show-overflow-tooltip
- />
- <el-table-column
- label="发票状态"
- align="center"
- prop="zciInvoiceStatus"
- :formatter="zciInvoiceStatusFormat"
- v-if="uncheckList.zciInvoiceStatus"
- show-overflow-tooltip
- />
- <el-table-column
- label="快递单号"
- align="center"
- prop="zciExpressNo"
- v-if="uncheckList.zciExpressNo"
- show-overflow-tooltip
- />
- <el-table-column
- label="操作"
- align="center"
- class-name="small-padding fixed-width"
- width="150"
- >
- <template slot-scope="scope">
- <el-button
- v-if="scope.row.zciInvoiceStatus != '0'"
- size="mini"
- type="text"
- @click="handleUpdate(scope.row)"
- v-hasPermi="['service:cost:update']"
- >编辑</el-button>
- <el-button
- v-if="scope.row.zciInvoiceStatus == '2' || scope.row.zciInvoiceStatus == '4'"
- size="mini"
- type="text"
- @click="handleInvoiceDelete(scope.row)"
- v-hasPermi="['service:cost:update']"
- >作废</el-button>
- <el-button
- v-if="scope.row.zciInvoiceStatus == '2' || scope.row.zciInvoiceStatus == '3'"
- size="mini"
- type="text"
- @click="handleInvoiceFlush(scope.row)"
- v-hasPermi="['service:cost:update']"
- >冲红</el-button>
- </template>
- </el-table-column>
- </el-table>
- <pagination
- v-show="total > 0"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- />
- </el-tab-pane>
- <el-tab-pane label="开票列表">
- <div class="zap-content">
- <el-button
- type="warning"
- @click="handleExportInvoice"
- :disabled="invoiceTotal == 0"
- v-hasPermi="['service:cost:export']"
- >导出</el-button>
- </div>
- <!-- 开票列表 -->
- <el-table v-loading="loading" :data="invoiceList" stripe>
- <el-table-column label="序号" type="index" width="50" align="center">
- <template slot-scope="scope">
- <span>{{(invoiceParams.pageNum - 1) * invoiceParams.pageSize + scope.$index + 1}}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="融资编号"
- align="center"
- prop="zfrNumber"
- v-if="uncheckList.zfrNumber"
- />
- <el-table-column
- label="融资企业"
- align="center"
- prop="supScyName"
- v-if="uncheckList.supScyName"
- />
- <el-table-column
- label="开立企业"
- align="center"
- prop="coreScyName"
- v-if="uncheckList.coreScyName"
- show-overflow-tooltip
- />
- <el-table-column
- label="融资产品"
- align="center"
- prop="zfpName"
- v-if="uncheckList.zfpName"
- show-overflow-tooltip
- />
- <el-table-column
- label="融资金额"
- align="center"
- prop="zfrAmount"
- :formatter="moneyFormat"
- v-if="uncheckList.zfrAmount"
- show-overflow-tooltip
- />
- <el-table-column
- label="融资状态"
- align="center"
- prop="zfrStatus"
- :formatter="zfrStatusFormat"
- v-if="uncheckList.zfrStatus"
- show-overflow-tooltip
- />
- <el-table-column
- label="费用状态"
- align="center"
- prop="zciStatus"
- :formatter="zciStatusFormat"
- v-if="uncheckList.zciStatus"
- show-overflow-tooltip
- />
- <el-table-column
- label="创建时间"
- align="center"
- prop="createTime"
- v-if="uncheckList.createTime"
- show-overflow-tooltip
- />
- <el-table-column
- label="手续费"
- align="center"
- prop="zciAmount"
- :formatter="moneyFormat"
- v-if="uncheckList.zciAmount "
- show-overflow-tooltip
- />
- <el-table-column
- label="发票状态"
- align="center"
- prop="zciInvoiceStatus"
- :formatter="zciInvoiceStatusFormat"
- v-if="uncheckList.zciInvoiceStatus"
- show-overflow-tooltip
- />
- <el-table-column
- label="快递单号"
- align="center"
- prop="zciExpressNo"
- v-if="uncheckList.zciExpressNo"
- show-overflow-tooltip
- />
- <el-table-column
- label="操作"
- align="center"
- class-name="small-padding fixed-width"
- width="150"
- >
- <template slot-scope="scope">
- <el-button
- v-if="scope.row.zciInvoiceStatus == '1' && scope.row.zciStatus == '02' && (scope.row.zfrStatus == '01' || scope.row.zfrStatus == '03') "
- size="mini"
- type="text"
- @click="handleInvoiceOpen(scope.row)"
- v-hasPermi="['service:cost:update']"
- >开票</el-button>
- </template>
- </el-table-column>
- </el-table>
- <pagination
- v-show="invoiceTotal > 0"
- :total="invoiceTotal"
- :page.sync="invoiceParams.pageNum"
- :limit.sync="invoiceParams.pageSize"
- @pagination="getInvoice"
- />
- </el-tab-pane>
- <!-- 发票框 -->
- <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
- <el-form ref="form" :model="form" :rules="rules" label-width="auto" :inline="true">
- <el-form-item label="企业名称" prop="scyName" size="large">
- <el-input v-model="form.scyName" disabled />
- </el-form-item>
- <el-form-item label="企业统一代码" prop="scySocialCode" size="large">
- <el-input v-model="form.scySocialCode" disabled />
- </el-form-item>
- <el-form-item label="企业注册电话" prop="scyPhone" size="large">
- <el-input v-model="form.scyPhone" disabled />
- </el-form-item>
- <el-form-item label="收件人" prop="ziaContacts" size="large">
- <el-input v-model="form.ziaContacts" disabled />
- </el-form-item>
- <el-form-item label="收件人电话" prop="ziaContactsPhone" size="large">
- <el-input v-model="form.ziaContactsPhone" disabled />
- </el-form-item>
- <el-form-item label="邮寄地址" prop="ziaAddress" size="large">
- <el-input v-model="form.ziaAddress" disabled />
- </el-form-item>
- <el-form-item label="快递单号" prop="zciExpressNo" size="large">
- <el-input
- v-model="form.zciExpressNo"
- placeholder="请输入快递单号"
- maxlength="30"
- show-word-limit
- />
- </el-form-item>
- </el-form>
- <el-row style="height: 109px;" type="flex" align="middle" justify="center">
- <el-button type="primary" plain @click="cancel">取 消</el-button>
- <el-button type="primary" @click="submitForm">确 定</el-button>
- </el-row>
- </el-dialog>
- <!-- 发票列表开票框 -->
- <el-dialog :title="openInvoiceTitle" :visible.sync="openInvoice" width="800px" append-to-body>
- <el-form
- ref="formInvoice"
- :model="formInvoice"
- :rules="rules"
- label-width="auto"
- :inline="true"
- >
- <el-form-item label="企业名称" prop="scyName" size="large">
- <el-input v-model="formInvoice.scyName" disabled />
- </el-form-item>
- <el-form-item label="企业统一代码" prop="scySocialCode" size="large">
- <el-input v-model="formInvoice.scySocialCode" disabled />
- </el-form-item>
- <el-form-item label="企业注册电话" prop="scyPhone" size="large">
- <el-input v-model="formInvoice.scyPhone" disabled />
- </el-form-item>
- <el-form-item label="收件人" prop="ziaContacts" size="large">
- <el-input v-model="formInvoice.ziaContacts" disabled />
- </el-form-item>
- <el-form-item label="收件人电话" prop="ziaContactsPhone" size="large">
- <el-input v-model="formInvoice.ziaContactsPhone" disabled />
- </el-form-item>
- <el-form-item label="邮寄地址" prop="ziaAddress" size="large">
- <el-input v-model="formInvoice.ziaAddress" disabled />
- </el-form-item>
- <el-form-item label="快递单号" prop="zciExpressNo" size="large">
- <el-input
- v-model="formInvoice.zciExpressNo"
- placeholder="请输入快递单号"
- maxlength="30"
- show-word-limit
- />
- </el-form-item>
- </el-form>
- <el-row style="height: 109px;" type="flex" align="middle" justify="center">
- <el-button type="primary" @click="submitFormInvoice">确 定</el-button>
- <el-button @click="cancelInvoice">取 消</el-button>
- </el-row>
- </el-dialog>
- <!-- 发票列表冲红框 -->
- <el-dialog :title="openFlushTitle" :visible.sync="openFlush" width="800px" append-to-body>
- <el-form
- ref="formFlush"
- :model="formFlush"
- :rules="rules"
- label-width="140px"
- :inline="true"
- >
- <el-form-item label="企业名称" prop="scyName">
- <el-input v-model="formFlush.scyName" disabled />
- </el-form-item>
- <el-form-item label="企业统一代码" prop="scySocialCode">
- <el-input v-model="formFlush.scySocialCode" disabled />
- </el-form-item>
- <el-form-item label="企业注册电话" prop="scyPhone">
- <el-input v-model="formFlush.scyPhone" disabled />
- </el-form-item>
- <el-form-item label="收件人" prop="ziaContacts">
- <el-input v-model="formFlush.ziaContacts" disabled />
- </el-form-item>
- <el-form-item label="收件人电话" prop="ziaContactsPhone">
- <el-input v-model="formFlush.ziaContactsPhone" disabled />
- </el-form-item>
- <el-form-item label="邮寄地址" prop="ziaAddress">
- <el-input v-model="formFlush.ziaAddress" disabled />
- </el-form-item>
- <el-form-item label="快递单号" prop="zciExpressNo">
- <el-input
- v-model="formFlush.zciExpressNo"
- placeholder="请输入快递单号"
- maxlength="30"
- show-word-limit
- />
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="submitFormFlush">确 定</el-button>
- <el-button @click="cancelFlush">取 消</el-button>
- </div>
- </el-dialog>
- </el-tabs>
- </el-row>
- </el-row>
- </template>
- <script>
- import {
- listCost,
- listInvoice,
- selectInvoiceList,
- applyInvoice,
- invoicing,
- daleteInvoice,
- getUser
- } from "@/api/service/cost/costManage";
- import { uploadFileNew } from "@/api/common/file";
- import { getToken } from "@/utils/auth";
- import { columnQuery, columnfilter } from "@/api/common/columnSetting";
- import ColumnSetting from "../../../components/Table/columnSetting.vue";
- import SearchBar from '@/components/SearchBar/index.vue'
- export default {
- name: "costManage",
- components: {
- ColumnSetting,
- SearchBar
- },
- data() {
- return {
- activeIndex: "",
- //费用列表
- costList: [],
- //开票列表
- invoiceList: [],
- //创建时间范围
- dateRange: [],
- dateInvoiceRange: [],
- //费用状态
- zciStatusOptions: [],
- //发票状态
- zciInvoiceStatusOptions: [],
- invoiceStatusOptions: [],
- //融资状态
- zfrStatusOptions: [],
- //操作员Id
- userId: "",
- // 遮罩层
- loading: true,
- // 选中数组
- ids: [],
- // 非多个禁用
- multiple: true,
- // 显示搜索条件
- showSearch: true,
- // 总条数
- // 弹出层标题
- title: "",
- openInvoiceTitle: "",
- openFlushTitle: "",
- total: 0,
- invoiceTotal: 0,
- // 是否显示弹出层
- open: false,
- openInvoice: false,
- openFlush: false,
- // 链属查询参数
- queryParams: {
- pageNum: 1,
- pageSize: 10,
- zfrNumber: null,
- coreScyName: null,
- supScyName: null,
- zciStatus: null,
- zfrStatus: null,
- zciInvoiceStatus: null
- },
- invoiceParams: {
- pageNum: 1,
- pageSize: 10,
- zfrNumber: null,
- supScyName: null,
- coreScyName: null,
- zciStatus: null,
- zfrStatus: null,
- zciInvoiceStatus: null
- },
- //筛选按钮的数据列表,与table表头的数据一致 --显示隐藏列用
- tableList: [
- {
- label: "zfrNumber",
- value: "融资编号"
- },
- {
- label: "supScyName",
- value: "融资企业"
- },
- {
- label: "coreScyName",
- value: "开立企业"
- },
- {
- label: "zfpName",
- value: "融资产品"
- },
- {
- label: "zfrAmount",
- value: "融资金额"
- },
- {
- label: "zciStatus",
- value: "费用状态"
- },
- {
- label: "zfrStatus",
- value: "融资状态"
- },
- {
- label: "createTime",
- value: "创建时间"
- },
- {
- label: "zciAmount",
- value: "手续费"
- },
- {
- label: "zciInvoiceStatus",
- value: "发票状态"
- },
- {
- label: "zciExpressNo",
- value: "快递单号"
- }
- ],
- checkList: [], //筛选列选中的数据列表--显示隐藏列用
- uncheckList: {}, //控制筛选列显示隐藏--显示隐藏列用
- selfDom: this,
- tableId: "/sc-service/cost/list",
- // 表单参数
- form: {
- zciId: null,
- scyId: null,
- scyName: null,
- scySocialCode: null,
- scyPhone: null,
- ziaContacts: null,
- ziaContactsPhone: null,
- ziaAddress: null,
- zciExpressNo: null,
- zciInvoiceStatus: null
- },
- formInvoice: {
- zciId: null,
- scyId: null,
- scyName: null,
- scySocialCode: null,
- scyPhone: null,
- ziaContacts: null,
- ziaContactsPhone: null,
- ziaAddress: null,
- zciExpressNo: null,
- zciInvoiceStatus: null
- },
- formFlush: {
- zciId: null,
- scyId: null,
- scyName: null,
- scySocialCode: null,
- scyPhone: null,
- ziaContacts: null,
- ziaContactsPhone: null,
- ziaAddress: null,
- zciExpressNo: null,
- zciInvoiceStatus: null
- },
- // 表单校验
- rules: {
- // zciExpressNo: [
- // { required: true, message: "快递单号不能为空", trigger: "blur" },
- // ]
- }
- };
- },
- activated() {
- this.getDicts("ser_zci_status").then(response => {
- this.zciStatusOptions = response.data;
- });
- this.getDicts("ser_zci_invoice_status").then(response => {
- this.zciInvoiceStatusOptions = response.data;
- });
- this.getDicts("ser_invoice_status").then(response => {
- this.invoiceStatusOptions = response.data;
- });
- this.getDicts("ser_zfr_status").then(response => {
- this.zfrStatusOptions = response.data;
- });
- this.getList();
- this.getInvoice();
- this.getUser();
- },
- // activated() {
- // this.getDicts("ser_zci_status").then(response => {
- // this.zciStatusOptions = response.data;
- // });
- // this.getDicts(" ser_zci_invoice_status").then(response => {
- // this.zciInvoiceStatusOptions = response.data;
- // });
- // this.getDicts(" ser_zfr_status").then(response => {
- // this.zfrStatusOptions = response.data;
- // });
- // this.getList();
- // this.getInvoice();
- // this.getUser();
- // },
- mounted() {
- this.columnQuery();
- },
- methods: {
- //列表格式化金额
- moneyFormat(row, column, cellValue) {
- if (cellValue == null || cellValue == undefined || cellValue == "") {
- cellValue = "0.00";
- }
- cellValue += "";
- if (!cellValue.includes(".")) {
- cellValue += ".00";
- }
- return cellValue
- .replace(/(\d)(?=(\d{3})+\.)/g, function($0, $1) {
- return $1 + ",";
- })
- .replace(/\.$/, "");
- },
- //获取当前客户是否之前设置过列展示隐藏
- columnQuery() {
- //获取页面路径
- var psfPagePath = window.location.pathname;
- //用请求后台的url作为唯一标识
- var psfTableName = this.tableId;
- var columnForm = {};
- columnForm.psfPagePath = psfPagePath;
- columnForm.psfTableName = psfTableName;
- columnQuery(columnForm).then(response => {
- if (response.data && response.data.psfShowData) {
- this.checkList = response.data.psfShowData;
- }
- this.filter();
- });
- },
- //控制隐藏显示的函数
- filter(checkList) {
- if (!!checkList) {
- this.checkList = checkList;
- }
- columnfilter(this.selfDom);
- },
- //菜单状态字典翻译
- zciStatusFormat(row, column) {
- return this.selectDictLabel(this.zciStatusOptions, row.zciStatus);
- },
- zciInvoiceStatusFormat(row, column) {
- return this.selectDictLabel(
- this.zciInvoiceStatusOptions,
- row.zciInvoiceStatus
- );
- },
- zfrStatusFormat(row, column) {
- return this.selectDictLabel(this.zfrStatusOptions, row.zfrStatus);
- },
- /** 查询链属列表 */
- getList() {
- this.loading = true;
- listCost(this.addDateRange(this.queryParams, this.dateRange)).then(
- response => {
- this.costList = response.data.records;
- this.total = response.data.total;
- this.loading = false;
- }
- );
- },
- getInvoice() {
- this.loading = true;
- selectInvoiceList(
- this.addDateRange(this.invoiceParams, this.dateInvoiceRange)
- ).then(response => {
- this.invoiceList = response.data.records;
- this.invoiceTotal = response.data.total;
- this.loading = false;
- });
- },
- // 取消按钮
- cancel() {
- this.open = false;
- this.reset();
- },
- // 表单重置
- reset() {
- this.resetForm("form");
- this.resetForm("formInvoice");
- this.resetForm("formFlush");
- },
- /** 搜索按钮操作 */
- handleQuery() {
- this.queryParams.pageNum = 1;
- this.getList();
- },
- /** 重置按钮操作 */
- resetQuery() {
- this.resetForm("queryForm");
- this.dateRange = [];
- this.handleQuery();
- },
- //发票列表
- handleInvoiceQuery() {
- this.invoiceParams.pageNum = 1;
- this.getInvoice();
- },
- resetInvoiceQuery() {
- this.resetForm("queryInvoiceForm");
- this.dateInvoiceRange = [];
- this.handleInvoiceQuery();
- },
- /** 编辑按钮操作 */
- handleUpdate(row) {
- this.reset();
- if (row.zciId) {
- } else {
- this.$message({
- type: "warning",
- message: "无费用数据"
- });
- return;
- }
- if (row.zfiSupplierId) {
- } else {
- this.$message({
- type: "warning",
- message: "无融资企业信息"
- });
- return;
- }
- const zciId = row.zciId || this.ids;
- const scyId = row.zfiSupplierId || this.ids;
- listInvoice(scyId, zciId).then(response => {
- this.form = response.data[0];
- this.form.zciId = zciId;
- });
- this.open = true;
- this.title = "发票信息";
- },
- /** 提交按钮 */
- submitForm() {
- var self = this;
- this.$refs["form"].validate(valid => {
- let fd = new FormData();
- for (var key in self.form) {
- fd.append(key, self.form[key]);
- }
- if (valid) {
- if (this.form.scyId != null) {
- const loading = this.$loading({
- lock: true,
- text: "Loading",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)"
- });
- invoicing(self.form).then(response => {
- this.msgSuccess("修改成功");
- this.open = false;
- this.getList();
- this.getInvoice();
- });
- loading.close();
- }
- }
- });
- },
- /* 开票作废 */
- handleInvoiceDelete(row) {
- const zciId = row.zciId || this.ids;
- const zciInvoiceStatus = "3";
- const data = { zciId, zciInvoiceStatus };
- this.$confirm("确认作废此发票?", "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(function() {
- return invoicing(data);
- })
- .then(() => {
- this.getList();
- this.getInvoice();
- this.msgSuccess("作废成功");
- })
- .catch(() => {
- this.$message({
- type: "warning",
- message: "已取消作废"
- });
- });
- },
- /* 发票列表开票按钮 */
- handleInvoiceOpen(row) {
- this.reset();
- if (row.zciId) {
- } else {
- this.$message({
- type: "warning",
- message: "无费用数据"
- });
- return;
- }
- if (row.zfiSupplierId) {
- } else {
- this.$message({
- type: "warning",
- message: "无融资企业信息"
- });
- return;
- }
- const zciId = row.zciId || this.ids;
- const scyId = row.zfiSupplierId || this.ids;
- listInvoice(scyId, zciId).then(response => {
- this.formInvoice = response.data[0];
- this.formInvoice.zciId = zciId;
- });
- this.openInvoice = true;
- this.openInvoiceTitle = "开票";
- },
- //发票列表开票取消
- cancelInvoice() {
- (this.openInvoice = false), this.reset();
- },
- //发票列表开票提交
- submitFormInvoice() {
- var self = this;
- this.$refs["formInvoice"].validate(valid => {
- let fd = new FormData();
- for (var key in self.formInvoice) {
- fd.append(key, self.formInvoice[key]);
- }
- if (valid) {
- if (this.formInvoice.scyId != null) {
- const loading = this.$loading({
- lock: true,
- text: "Loading",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)"
- });
- this.formInvoice.zciInvoiceStatus = "2";
- invoicing(self.formInvoice).then(response => {
- this.msgSuccess("开票成功");
- this.openInvoice = false;
- this.getList();
- this.getInvoice();
- });
- loading.close();
- }
- }
- });
- },
- //冲红按钮
- handleInvoiceFlush(row) {
- this.reset();
- if (row.zciId) {
- } else {
- this.$message({
- type: "warning",
- message: "无费用数据"
- });
- return;
- }
- if (row.zfiSupplierId) {
- } else {
- this.$message({
- type: "warning",
- message: "无融资企业信息"
- });
- return;
- }
- const zciId = row.zciId || this.ids;
- const scyId = row.zfiSupplierId || this.ids;
- listInvoice(scyId, zciId).then(response => {
- this.formFlush = response.data[0];
- this.formFlush.zciId = zciId;
- });
- this.openFlush = true;
- this.openFlushTitle = "开票";
- },
- //发票列表冲红取消
- cancelFlush() {
- (this.openFlush = false), this.reset();
- },
- //发票列表冲红提交
- submitFormFlush() {
- var self = this;
- this.$refs["formFlush"].validate(valid => {
- let fd = new FormData();
- for (var key in self.formFlush) {
- fd.append(key, self.formFlush[key]);
- }
- if (valid) {
- if (this.formFlush.scyId != null) {
- const loading = this.$loading({
- lock: true,
- text: "Loading",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)"
- });
- this.formFlush.zciInvoiceStatus = "4";
- invoicing(self.formFlush).then(response => {
- this.msgSuccess("冲红成功");
- this.openFlush = false;
- this.getList();
- this.getInvoice();
- });
- loading.close();
- }
- }
- });
- },
- /** 导出按钮操作 */
- handleExport() {
- // this.getList();
- const loading = this.$loading({
- lock: true,
- text: "Loading",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)"
- });
- this.download(
- "/sc-service/cost/export",
- {
- ...this.queryParams,
- ...this.dateRange
- },
- "费用信息.xlsx"
- );
- setTimeout(() => {
- loading.close();
- }, 2000);
- },
- /** 导出按钮操作 */
- handleExportInvoice() {
- // this.getList();
- const loading = this.$loading({
- lock: true,
- text: "Loading",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)"
- });
- this.download(
- "/sc-service/cost/exportInvoice",
- {
- ...this.invoiceParams,
- ...this.dateInvoiceRange
- },
- "发票信息.xlsx"
- );
- setTimeout(() => {
- loading.close();
- }, 2000);
- },
- //获取操作员Id
- getUser() {
- getUser().then(response => {
- this.userId = response.data.userId;
- });
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- ::v-deep .el-tabs__item {
- width: 105px;
- height: 55px;
- padding: 0;
- line-height: 55px;
- text-align: center;
- font-size: 16px;
- }
- </style>
|