userCostManage.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676
  1. <template>
  2. <!-- ________________________________________融资企业用________________________________________________ -->
  3. <div class="app-container zap-main">
  4. <search-bar
  5. :checkList="checkList"
  6. :tableList="tableList"
  7. :selfDom="selfDom"
  8. :tableId="tableId"
  9. @query="handleQuery"
  10. @reset="resetQuery">
  11. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="auto">
  12. <el-form-item label="类型" prop="zciQuery">
  13. <el-select v-model="queryParams.zciQuery" clearable>
  14. <el-option v-for="dict in queryOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" v-if="dict.dictValue == '02' && companyType != '02'" />
  15. <el-option v-for="dict in queryOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" v-if="dict.dictValue != '02'" />
  16. </el-select>
  17. </el-form-item>
  18. <el-form-item prop="zciValue" v-if="this.queryParams.zciQuery">
  19. <el-input v-model="queryParams.zciValue" placeholder="请输入关键字模糊查询" clearable maxlength="25" />
  20. </el-form-item>
  21. <el-form-item label="融资状态" prop="zfrStatus">
  22. <el-select v-model="queryParams.zfrStatus" placeholder="融资状态" clearable>
  23. <el-option v-for="dict in zfrStatusOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue"></el-option>
  24. </el-select>
  25. </el-form-item>
  26. <el-form-item label="费用状态" prop="zciStatus">
  27. <el-select v-model="queryParams.zciStatus" placeholder="费用状态" clearable>
  28. <el-option v-for="dict in zciStatusOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue"></el-option>
  29. </el-select>
  30. </el-form-item>
  31. <el-form-item label="发票状态" prop="zciInvoiceStatus">
  32. <el-select v-model="queryParams.zciInvoiceStatus" placeholder="发票状态" clearable>
  33. <el-option v-for="dict in zciInvoiceStatusOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue"></el-option>
  34. </el-select>
  35. </el-form-item>
  36. <el-form-item label="创建时间">
  37. <el-date-picker
  38. v-model="dateRange"
  39. value-format="yyyy-MM-dd"
  40. type="daterange"
  41. range-separator="-"
  42. start-placeholder="开始日期"
  43. end-placeholder="结束日期"></el-date-picker>
  44. </el-form-item>
  45. </el-form>
  46. </search-bar>
  47. <div class="zap-content zap-margin-top">
  48. <export-button @click="handleExport" v-hasPermi="['service:cost:export']" :disabled="total == 0">导出</export-button>
  49. </div>
  50. <el-row class="zap-form">
  51. <el-table v-loading="loading" :data="costList" border stripe>
  52. <el-table-column label="序号" type="index" width="50" align="center">
  53. <template slot-scope="scope">
  54. <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
  55. </template>
  56. </el-table-column>
  57. <el-table-column label="融资编号" align="center" prop="zfrNumber" v-if="uncheckList.zfrNumber" />
  58. <el-table-column label="开立企业" align="center" prop="coreScyName" v-if="uncheckList.coreScyName" show-overflow-tooltip />
  59. <el-table-column label="融资产品" align="center" prop="zfpName" v-if="uncheckList.zfpName" show-overflow-tooltip />
  60. <el-table-column
  61. label="融资金额"
  62. align="center"
  63. prop="zfrAmount"
  64. :formatter="moneyFormat"
  65. v-if="uncheckList.zfrAmount"
  66. show-overflow-tooltip />
  67. <el-table-column
  68. label="融资状态"
  69. align="center"
  70. prop="zfrStatus"
  71. :formatter="zfrStatusFormat"
  72. v-if="uncheckList.zfrStatus"
  73. show-overflow-tooltip />
  74. <el-table-column
  75. label="费用状态"
  76. align="center"
  77. prop="zciStatus"
  78. :formatter="zciStatusFormat"
  79. v-if="uncheckList.zciStatus"
  80. show-overflow-tooltip />
  81. <el-table-column label="创建时间" align="center" prop="createTime" v-if="uncheckList.createTime" show-overflow-tooltip />
  82. <el-table-column
  83. label="手续费"
  84. align="center"
  85. prop="zciAmount"
  86. :formatter="moneyFormat"
  87. v-if="uncheckList.zciAmount "
  88. show-overflow-tooltip />
  89. <el-table-column
  90. label="发票状态"
  91. align="center"
  92. prop="zciInvoiceStatus"
  93. :formatter="zciInvoiceStatusFormat"
  94. v-if="uncheckList.zciInvoiceStatus"
  95. show-overflow-tooltip />
  96. <el-table-column label="快递单号" align="center" prop="zciExpressNo" v-if="uncheckList.zciExpressNo" show-overflow-tooltip />
  97. <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150" fixed="right">
  98. <template slot-scope="scope">
  99. <plain-button v-if="scope.row.zciInvoiceStatus == '2' || scope.row.zciInvoiceStatus == '4'" size="mini" type="text" @click="handleUpdate(scope.row)" v-hasPermi="['service:cost:update']">发票</plain-button>
  100. <pay-button v-if="scope.row.zfrStatus != '02' && (scope.row.zciStatus == '00' || scope.row.zciStatus == '05')" size="mini" type="text" @click="handlePay(scope.row)" v-hasPermi="['service:cost:pay']"></pay-button>
  101. <apply-button v-if="scope.row.zciStatus == '02' && (scope.row.zfrStatus == '01' || scope.row.zfrStatus == '03') && scope.row.zciInvoiceStatus == '0'" size="mini" type="text" @click="handleApply(scope.row)" v-hasPermi="['service:cost:apply']"></apply-button>
  102. </template>
  103. </el-table-column>
  104. </el-table>
  105. </el-row>
  106. <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
  107. <!-- 发票框 -->
  108. <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
  109. <el-form ref="form" :model="form" label-width="140px" :inline="true">
  110. <el-form-item label="企业名称" prop="scyName">
  111. <el-input v-model="form.scyName" disabled />
  112. </el-form-item>
  113. <el-form-item label="企业统一代码" prop="scySocialCode">
  114. <el-input v-model="form.scySocialCode" disabled />
  115. </el-form-item>
  116. <el-form-item label="企业注册电话" prop="scyPhone">
  117. <el-input v-model="form.scyPhone" disabled />
  118. </el-form-item>
  119. <el-form-item label="收件人" prop="ziaContacts">
  120. <el-input v-model="form.ziaContacts" disabled />
  121. </el-form-item>
  122. <el-form-item label="收件人电话" prop="ziaContactsPhone">
  123. <el-input v-model="form.ziaContactsPhone" disabled />
  124. </el-form-item>
  125. <el-form-item label="邮寄地址" prop="ziaAddress">
  126. <el-input v-model="form.ziaAddress" disabled />
  127. </el-form-item>
  128. <el-form-item label="快递单号" prop="zciExpressNo">
  129. <el-input v-model="form.zciExpressNo" disabled />
  130. </el-form-item>
  131. </el-form>
  132. <div slot="footer" class="dialog-footer">
  133. <el-button @click="cancel">取 消</el-button>
  134. </div>
  135. </el-dialog>
  136. <!-- 申请开票框 -->
  137. <el-dialog :title="titleApply" :visible.sync="openApply" width="800px" append-to-body>
  138. <el-row class="zap-form">
  139. <el-form ref="formApply" :model="formApply" :rules="rulesApply" label-width="140px" :inline="true">
  140. <el-form-item label="企业名称" prop="scyName">
  141. <el-input v-model="formApply.scyName" disabled />
  142. </el-form-item>
  143. <el-form-item label="企业统一代码" prop="scySocialCode">
  144. <el-input v-model="formApply.scySocialCode" disabled />
  145. </el-form-item>
  146. <el-form-item label="企业注册电话" prop="scyPhone">
  147. <el-input v-model="formApply.scyPhone" disabled />
  148. </el-form-item>
  149. <el-form-item label="收件人" prop="ziaContacts">
  150. <el-input v-model="formApply.ziaContacts" placeholder="请输入收件人" maxlength="20" show-word-limit />
  151. </el-form-item>
  152. <el-form-item label="收件人电话" prop="ziaContactsPhone">
  153. <el-input v-model="formApply.ziaContactsPhone" placeholder="请输入收件人电话" maxlength="11" show-word-limit />
  154. </el-form-item>
  155. <el-form-item label="邮寄地址" prop="ziaAddress">
  156. <el-input v-model="formApply.ziaAddress" placeholder="请输入邮寄地址" maxlength="30" show-word-limit />
  157. </el-form-item>
  158. </el-form>
  159. </el-row>
  160. <div slot="footer" class="dialog-footer">
  161. <el-button type="primary" @click="submitForm">确 定</el-button>
  162. <el-button @click="cancel">取 消</el-button>
  163. </div>
  164. </el-dialog>
  165. <!-- 去缴费 -->
  166. <paying :payingMoney="payingMoney" :openPaying.sync="openPaying" @submitHandler="submitHandler" @cancelHandler="cancelHandler" @close="cancelHandler"></paying>
  167. </div>
  168. </template>
  169. <script>
  170. import {
  171. listCost,
  172. listInvoice,
  173. selectInvoiceList,
  174. applyInvoice,
  175. invoicing,
  176. daleteInvoice,
  177. getUser,
  178. changeZfiStatus
  179. } from "@/api/service/cost/costManage";
  180. import {
  181. uploadFileNew
  182. } from "@/api/common/file";
  183. import {
  184. getToken
  185. } from "@/utils/auth";
  186. import {
  187. columnQuery,
  188. columnfilter
  189. } from "@/api/common/columnSetting";
  190. import ColumnSetting from "../../../components/Table/columnSetting.vue";
  191. import SearchBar from '@/components/SearchBar/index.vue'
  192. import ExportButton from '@/components/ExportButton/index.vue'
  193. import PayButton from '@/components/PayButton/index.vue'
  194. import ApplyButton from '@/components/ApplyButton/index.vue'
  195. import PlainButton from '@/components/PlainButton/index.vue'
  196. import Paying from "@/components/Paying/index.vue"
  197. import {
  198. balance,
  199. transfer
  200. } from "@/api/bank/bankInterface";
  201. export default {
  202. name: "userCostManage",
  203. components: {
  204. ColumnSetting,
  205. SearchBar,
  206. ExportButton,
  207. PayButton,
  208. ApplyButton,
  209. PlainButton,
  210. Paying
  211. },
  212. data() {
  213. return {
  214. //企业类型
  215. companyType: null,
  216. //费用列表
  217. costList: [],
  218. //创建时间范围
  219. dateRange: [],
  220. //费用状态
  221. zciStatusOptions: [],
  222. //发票状态
  223. zciInvoiceStatusOptions: [],
  224. //融资状态
  225. zfrStatusOptions: [],
  226. //筛选条件
  227. queryOptions: [],
  228. //操作员Id
  229. userId: "",
  230. // 遮罩层
  231. loading: true,
  232. // 选中数组
  233. ids: [],
  234. // 非多个禁用
  235. multiple: true,
  236. // 显示搜索条件
  237. showSearch: true,
  238. // 总条数
  239. // 弹出层标题
  240. title: "",
  241. openInvoiceTitle: "",
  242. titleApply: "",
  243. total: 0,
  244. // 是否显示弹出层
  245. open: false,
  246. openInvoice: false,
  247. openApply: false,
  248. // 链属查询参数
  249. queryParams: {
  250. pageNum: 1,
  251. pageSize: 10,
  252. zfrNumber: null,
  253. coreScyName: null,
  254. zciStatus: null,
  255. zfrStatus: null,
  256. zciInvoiceStatus: null,
  257. zciQuery: null,
  258. zciValue: null
  259. },
  260. //筛选按钮的数据列表,与table表头的数据一致 --显示隐藏列用
  261. tableList: [{
  262. label: "zfrNumber",
  263. value: "融资编号"
  264. },
  265. {
  266. label: "supScyName",
  267. value: "融资企业"
  268. },
  269. {
  270. label: "coreScyName",
  271. value: "开立企业"
  272. },
  273. {
  274. label: "zfpName",
  275. value: "融资产品"
  276. },
  277. {
  278. label: "zfrAmount",
  279. value: "融资金额"
  280. },
  281. {
  282. label: "zciStatus",
  283. value: "费用状态"
  284. },
  285. {
  286. label: "zfrStatus",
  287. value: "融资状态"
  288. },
  289. {
  290. label: "createTime",
  291. value: "创建时间"
  292. },
  293. {
  294. label: "zciAmount",
  295. value: "手续费"
  296. },
  297. {
  298. label: "zciInvoiceStatus",
  299. value: "发票状态"
  300. },
  301. {
  302. label: "zciExpressNo",
  303. value: "快递单号"
  304. }
  305. ],
  306. checkList: [], //筛选列选中的数据列表--显示隐藏列用
  307. uncheckList: {}, //控制筛选列显示隐藏--显示隐藏列用
  308. selfDom: this,
  309. tableId: "/sc-service/cost/list",
  310. // 表单参数
  311. form: {
  312. zciId: null,
  313. scyId: null,
  314. scyName: null,
  315. scySocialCode: null,
  316. scyPhone: null,
  317. ziaContacts: null,
  318. ziaContactsPhone: null,
  319. ziaAddress: null,
  320. zciExpressNo: null,
  321. zciInvoiceStatus: null
  322. },
  323. formApply: {
  324. zciId: null,
  325. scyId: null,
  326. scyName: null,
  327. scySocialCode: null,
  328. scyPhone: null,
  329. ziaContacts: null,
  330. ziaContactsPhone: null,
  331. ziaAddress: null,
  332. zciExpressNo: null,
  333. zciInvoiceStatus: null
  334. },
  335. // 表单校验
  336. rulesApply: {
  337. ziaContacts: [{
  338. required: true,
  339. message: "收件人不能为空",
  340. trigger: "blur"
  341. }],
  342. ziaContactsPhone: [{
  343. required: true,
  344. message: "收件人电话不能为空",
  345. trigger: "blur"
  346. },
  347. {
  348. pattern: /^((\d{3}-\d{7,8}|\d{4}-\d{7,8})|(1[3465789]\d{9}))$/,
  349. message: "电话格式不正确",
  350. trigger: "blur"
  351. }
  352. ],
  353. ziaAddress: [{
  354. required: true,
  355. message: "邮寄地址不能为空",
  356. trigger: "blur"
  357. }]
  358. },
  359. openPaying: false,
  360. payingRow: {},
  361. payingId: "",
  362. payingMoney: ""
  363. };
  364. },
  365. created() {
  366. this.getDicts("ser_zci_status").then(response => {
  367. this.zciStatusOptions = response.data;
  368. });
  369. this.getDicts(" ser_zci_invoice_status").then(response => {
  370. this.zciInvoiceStatusOptions = response.data;
  371. });
  372. this.getDicts(" ser_zfr_status").then(response => {
  373. this.zfrStatusOptions = response.data;
  374. });
  375. this.getDicts(" zc_zci_query").then(response => {
  376. this.queryOptions = response.data;
  377. });
  378. this.getUser();
  379. this.getList();
  380. },
  381. activated() {
  382. this.getDicts("ser_zci_status").then(response => {
  383. this.zciStatusOptions = response.data;
  384. });
  385. this.getDicts(" ser_zci_invoice_status").then(response => {
  386. this.zciInvoiceStatusOptions = response.data;
  387. });
  388. this.getDicts(" ser_zfr_status").then(response => {
  389. this.zfrStatusOptions = response.data;
  390. });
  391. this.getUser();
  392. this.getList();
  393. },
  394. mounted() {
  395. this.columnQuery();
  396. },
  397. methods: {
  398. //列表格式化金额
  399. moneyFormat(row, column, cellValue) {
  400. if (cellValue == null || cellValue == undefined || cellValue == "") {
  401. cellValue = "0.00";
  402. }
  403. cellValue += "";
  404. if (!cellValue.includes(".")) {
  405. cellValue += ".00";
  406. }
  407. return cellValue
  408. .replace(/(\d)(?=(\d{3})+\.)/g, function ($0, $1) {
  409. return $1 + ",";
  410. })
  411. .replace(/\.$/, "");
  412. },
  413. //获取当前客户是否之前设置过列展示隐藏
  414. columnQuery() {
  415. //获取页面路径
  416. var psfPagePath = window.location.pathname;
  417. //用请求后台的url作为唯一标识
  418. var psfTableName = this.tableId;
  419. var columnForm = {};
  420. columnForm.psfPagePath = psfPagePath;
  421. columnForm.psfTableName = psfTableName;
  422. columnQuery(columnForm).then(response => {
  423. if (response.data && response.data.psfShowData) {
  424. this.checkList = response.data.psfShowData;
  425. }
  426. this.filter();
  427. });
  428. },
  429. //控制隐藏显示的函数
  430. filter(checkList) {
  431. if (!!checkList) {
  432. this.checkList = checkList;
  433. }
  434. columnfilter(this.selfDom);
  435. },
  436. //菜单状态字典翻译
  437. zciStatusFormat(row, column) {
  438. return this.selectDictLabel(this.zciStatusOptions, row.zciStatus);
  439. },
  440. zciInvoiceStatusFormat(row, column) {
  441. return this.selectDictLabel(
  442. this.zciInvoiceStatusOptions,
  443. row.zciInvoiceStatus
  444. );
  445. },
  446. zfrStatusFormat(row, column) {
  447. return this.selectDictLabel(this.zfrStatusOptions, row.zfrStatus);
  448. },
  449. /** 查询链属列表 */
  450. getList() {
  451. this.loading = true;
  452. listCost(this.addDateRange(this.queryParams, this.dateRange)).then(
  453. response => {
  454. this.costList = response.data.records;
  455. this.total = response.data.total;
  456. this.loading = false;
  457. }
  458. );
  459. },
  460. // 取消按钮
  461. cancel() {
  462. this.open = false;
  463. this.openApply = false;
  464. this.reset();
  465. },
  466. // 表单重置
  467. reset() {
  468. this.resetForm("form");
  469. },
  470. /** 搜索按钮操作 */
  471. handleQuery() {
  472. this.queryParams.pageNum = 1;
  473. this.getList();
  474. },
  475. /** 重置按钮操作 */
  476. resetQuery() {
  477. this.resetForm("queryForm");
  478. this.dateRange = [];
  479. this.handleQuery();
  480. },
  481. /** 发票按钮操作 */
  482. handleUpdate(row) {
  483. this.reset();
  484. if (row.zciId) {} else {
  485. this.$message({
  486. type: "warning",
  487. message: "无费用数据"
  488. });
  489. return;
  490. }
  491. if (row.zfiSupplierId) {} else {
  492. this.$message({
  493. type: "warning",
  494. message: "无融资企业信息"
  495. });
  496. return;
  497. }
  498. const zciId = row.zciId || this.ids;
  499. const scyId = row.zfiSupplierId || this.ids;
  500. listInvoice(scyId, zciId).then(response => {
  501. this.form = response.data[0];
  502. this.form.zciId = zciId;
  503. });
  504. this.open = true;
  505. this.title = "发票信息";
  506. },
  507. /** 发票按钮操作 */
  508. handleApply(row) {
  509. this.reset();
  510. if (row.zciId) {} else {
  511. this.$message({
  512. type: "warning",
  513. message: "无费用数据"
  514. });
  515. return;
  516. }
  517. if (row.zfiSupplierId) {} else {
  518. this.$message({
  519. type: "warning",
  520. message: "无融资企业信息"
  521. });
  522. return;
  523. }
  524. const zciId = row.zciId || this.ids;
  525. const scyId = row.zfiSupplierId || this.ids;
  526. listInvoice(scyId, zciId).then(response => {
  527. this.formApply = response.data[0];
  528. this.formApply.zciId = zciId;
  529. });
  530. this.openApply = true;
  531. this.titleApply = "申请开票信息";
  532. },
  533. submitHandler() {
  534. var self = this;
  535. const row = this.payingRow
  536. const zciId = row.zciId || this.ids;
  537. const loading = self.$loading({
  538. lock: true,
  539. text: "Loading",
  540. spinner: "el-icon-loading",
  541. background: "rgba(0, 0, 0, 0.7)",
  542. });
  543. // self.paiAccno = '3115730025230000214';
  544. if (row.accNo) {
  545. balance(row.accNo).then(response => {
  546. if (eval(row.zciAmount) > eval(response.data.list.row.KYAMT)) {
  547. self.$message({
  548. message: '余额为' + response.data.list.row.KYAMT + '不足以抵扣本次缴费费用,请及时充值',
  549. type: 'warning'
  550. });
  551. loading.close();
  552. } else {
  553. if (row.zfrStatus == '01' || row.zfrStatus == '03') {
  554. var map = {
  555. 'recvAccNo': '',
  556. 'recvAccNm': '',
  557. 'tranAmt': row.zciAmount,
  558. 'businessId': row.zciId,
  559. 'type': '01'
  560. }
  561. transfer(map).then(response => {
  562. loading.close();
  563. self.msgSuccess("缴费成功");
  564. return changeZfiStatus(zciId);
  565. }).catch(() => {
  566. loading.close();
  567. });
  568. } else {
  569. var map = {
  570. 'recvAccNo': '',
  571. 'recvAccNm': '',
  572. 'tranAmt': row.zciAmount,
  573. 'businessId': row.zciId,
  574. 'type': '00'
  575. }
  576. transfer(map).then(response => {
  577. loading.close();
  578. self.msgSuccess("缴费成功");
  579. return changeZfiStatus(zciId);
  580. }).catch(() => {
  581. loading.close();
  582. });
  583. }
  584. }
  585. }).catch(() => {
  586. loading.close();
  587. });
  588. } else {
  589. self.$message({
  590. message: '您还没有电子账户,请联系平台开通电子账户',
  591. type: 'warning'
  592. });
  593. loading.close();
  594. }
  595. },
  596. cancelHandler() {
  597. this.openPaying = false
  598. },
  599. //去缴费
  600. handlePay(row) {
  601. this.payingRow = row
  602. this.payingId = row.zciId || this.ids;
  603. this.payingMoney = row.zciAmount;
  604. this.openPaying = true
  605. },
  606. /** 提交按钮 */
  607. submitForm() {
  608. var self = this;
  609. this.$refs["formApply"].validate(valid => {
  610. let fd = new FormData();
  611. for (var key in self.formApply) {
  612. fd.append(key, self.formApply[key]);
  613. }
  614. if (valid) {
  615. if (this.formApply.scyId != null) {
  616. const loading = this.$loading({
  617. lock: true,
  618. text: "Loading",
  619. spinner: "el-icon-loading",
  620. background: "rgba(0, 0, 0, 0.7)"
  621. });
  622. applyInvoice(self.formApply)
  623. .then(response => {
  624. this.msgSuccess("申请成功");
  625. loading.close();
  626. this.openApply = false;
  627. this.getList();
  628. })
  629. .catch(response => {
  630. loading.close();
  631. });
  632. }
  633. }
  634. });
  635. },
  636. /** 导出按钮操作 */
  637. handleExport() {
  638. // this.getList();
  639. const loading = this.$loading({
  640. lock: true,
  641. text: "Loading",
  642. spinner: "el-icon-loading",
  643. background: "rgba(0, 0, 0, 0.7)"
  644. });
  645. this.download(
  646. "/sc-service/cost/export", {
  647. ...this.queryParams,
  648. ...this.dateRange
  649. },
  650. "费用信息.xlsx"
  651. );
  652. setTimeout(() => {
  653. loading.close();
  654. }, 2000);
  655. },
  656. //获取操作员Id
  657. getUser() {
  658. getUser().then(response => {
  659. this.userId = response.data.userId;
  660. this.companyType = response.data.scyType
  661. });
  662. }
  663. }
  664. };
  665. </script>