index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785
  1. <template>
  2. <div class="app-container">
  3. <el-row type="flex" justify="space-between" style="margin-bottom: 20px">
  4. <div class="grid-content bg-purple">
  5. <div class="grid-content bg-purple">
  6. <el-input placeholder="请输入承兑人名称" v-model="formData.name" @change="Search" clearable style="width: 100%">
  7. <i slot="prefix" class="el-input__icon el-icon-search"></i>
  8. </el-input>
  9. </div>
  10. </div>
  11. <div class="grid-content bg-purple">
  12. <el-dropdown @command="handleCommand">
  13. <div class="pulldown">
  14. <span class="el-dropdown-link" v-if="!Status"> 承兑人状态 </span>
  15. <span class="el-dropdown-link" v-if="Status">
  16. {{ Status }}
  17. </span>
  18. <i class="el-icon-arrow-down el-icon--right"></i>
  19. </div>
  20. <el-dropdown-menu slot="dropdown">
  21. <el-dropdown-item command="全部">全部</el-dropdown-item>
  22. <el-dropdown-item command="正常">正常</el-dropdown-item>
  23. <el-dropdown-item command="删除">删除</el-dropdown-item>
  24. </el-dropdown-menu>
  25. </el-dropdown>
  26. </div>
  27. <div class="grid-content bg-purple" style="display: flex; justify-content: flex-end">
  28. <el-button type="success" @click="recovers">恢复</el-button>
  29. <el-button type="danger" @click="deleteStatuses">删除</el-button>
  30. <el-button type="primary" @click="dialogVisible2 = true">新增承兑人</el-button>
  31. <el-button type="primary" @click="batchExports">导出</el-button>
  32. </div>
  33. </el-row>
  34. <!-- 弹窗修改 -->
  35. <el-dialog title="修改承兑人" :visible.sync="dialogVisible1" width="500px">
  36. <el-form :model="tableData" label-width="100px">
  37. <el-form-item label="姓名" prop="tableData.name">
  38. <el-input v-model="tableData.name" style="width: 100%" placeholder="姓名"></el-input>
  39. </el-form-item>
  40. <el-form-item label="银行账号" prop="tableData.bankAccount">
  41. <el-input v-model="tableData.bankAccount" style="width: 100%" placeholder="请输入银行账号(选填)"></el-input>
  42. </el-form-item>
  43. <el-form-item label="银行名称" prop="tableData.bankName">
  44. <el-input v-model="tableData.bankName" style="width: 100%" placeholder="请输入银行名称(选填)"></el-input>
  45. </el-form-item>
  46. <el-form-item label="开户行行号" prop="bankName">
  47. <el-input v-model="tableData.bankNo" style="width: 100%" placeholder="请输入开户行行号(选填)"></el-input>
  48. </el-form-item>
  49. <el-form-item label="服务费率" prop="tableData.serviceRate">
  50. <el-input v-model="tableData.serviceRate" style="width: 100%" placeholder="请输入服务费率"
  51. onkeyup="value=value.replace(/[^\d.]/g,'')">
  52. <i slot="suffix" style="font-style: normal; margin-right: 10px">%</i>
  53. </el-input>
  54. </el-form-item>
  55. <el-form-item label="利率" prop="tableData.interest">
  56. <el-input v-model="tableData.interest" style="width: 100%" placeholder="请输入利率"
  57. onkeyup="value=value.replace(/[^\d.]/g,'')">
  58. <i slot="suffix" style="font-style: normal; margin-right: 10px">%</i>
  59. </el-input>
  60. </el-form-item>
  61. <el-form-item label="修改合同模板" >
  62. <div style="display: flex; justify-content: start">
  63. <div class="imgbox">
  64. <FileUpload
  65. v-model="tableData.templateServiceContract"
  66. accept=".doc, .docx"
  67. />
  68. <!-- <FileShow
  69. :files="form.templateServiceContract"
  70. /> -->
  71. </div>
  72. </div>
  73. </el-form-item>
  74. <el-form-item>
  75. <el-button @click="dialogVisible1 = false">取 消</el-button>
  76. <el-button type="primary" @click="onSubmit">提交修改</el-button>
  77. </el-form-item>
  78. </el-form>
  79. </el-dialog>
  80. <!-- 弹窗新增承兑人 -->
  81. <el-dialog title="新增承兑人" :visible.sync="dialogVisible2" width="500px">
  82. <el-form ref="form" :model="form" :rules="rules" label-width="100px">
  83. <el-form-item label="承兑人名称" prop="name">
  84. <el-input v-model="form.name" style="width: 100%" placeholder="请输入承兑人名称"></el-input>
  85. </el-form-item>
  86. <el-form-item label="账号" prop="bankAccount">
  87. <el-input v-model="form.bankAccount" style="width: 100%" placeholder="请输入账号(选填)"></el-input>
  88. </el-form-item>
  89. <el-form-item label="开户行名称" prop="bankName">
  90. <el-input v-model="form.bankName" style="width: 100%" placeholder="请输入开户行名称(选填)"></el-input>
  91. </el-form-item>
  92. <el-form-item label="开户行行号" prop="bankName">
  93. <el-input v-model="form.bankNo" style="width: 100%" placeholder="请输入开户行行号(选填)"></el-input>
  94. </el-form-item>
  95. <el-form-item label="服务费率" prop="serviceRate">
  96. <el-input v-model="form.serviceRate" placeholder="请输入服务费率" style="width: 100%"
  97. onkeyup="value=value.replace(/[^\d.]/g,'')">
  98. <i slot="suffix" style="font-style: normal; margin-right: 10px">%</i>
  99. </el-input>
  100. </el-form-item>
  101. <el-form-item label="利率" prop="interest">
  102. <el-input v-model="form.interest" placeholder="请输入利率" style="width: 100%"
  103. onkeyup="value=value.replace(/[^\d.]/g,'')">
  104. <i slot="suffix" style="font-style: normal; margin-right: 10px">%</i>
  105. </el-input>
  106. </el-form-item>
  107. <el-form-item label="上传合同模板" >
  108. <div style="display: flex; justify-content: start">
  109. <div class="imgbox">
  110. <FileUpload
  111. v-model="form.templateServiceContract"
  112. accept=".doc, .docx"
  113. />
  114. <!-- <FileShow
  115. :files="form.templateServiceContract"
  116. /> -->
  117. </div>
  118. </div>
  119. </el-form-item>
  120. <el-form-item>
  121. <el-button @click="dialogVisible2 = false">取 消</el-button>
  122. <el-button type="primary" @click="addAcceptor">确认添加</el-button>
  123. </el-form-item>
  124. </el-form>
  125. </el-dialog>
  126. <el-table :row-key="getRowKey" v-loading="listLoading" :data="temporaryList" element-loading-text="Loading" border
  127. fit ref="multipleTable" highlight-current-row @select="handleSelectionChange" @select-all="handleAll">
  128. <el-table-column align="center" label="" width="55" type="selection" :reserve-selection="true">
  129. </el-table-column>
  130. <el-table-column label="承兑人名称" align="center" prop="name">
  131. </el-table-column>
  132. <el-table-column label="账号" align="center" prop="bankAccount">
  133. </el-table-column>
  134. <el-table-column align="center" label="开户行名称" prop="bankName">
  135. </el-table-column>
  136. <el-table-column align="center" label="开户行行号" prop="bankNo">
  137. </el-table-column>
  138. <el-table-column align="center" label="服务合同模板" >
  139. <template slot-scope="scope">
  140. <el-tag type="primary" style="cursor: pointer; " @click="download(scope.row.templateServiceContract)">下载
  141. </el-tag>
  142. </template>
  143. </el-table-column>
  144. <el-table-column align="center" label="服务费率">
  145. <template slot-scope="scope"> {{ scope.row.serviceRate }}% </template>
  146. </el-table-column>
  147. <el-table-column align="center" label="利率" prop="interest">
  148. <template slot-scope="scope"> {{ scope.row.interest }}% </template>
  149. </el-table-column>
  150. <el-table-column align="center" label="承兑人状态" prop="statusText">
  151. </el-table-column>
  152. <el-table-column align="center" label="时间" prop="createdAt" width="200">
  153. </el-table-column>
  154. <el-table-column align="center" prop="created_at" label="操作" width="300">
  155. <template slot-scope="scope">
  156. <!-- <el-tag type="primary" style="cursor: pointer; margin-right: 15px" @click="toDetail(scope.row.id)">
  157. 详情</el-tag> -->
  158. <el-tag type="primary" style="cursor: pointer; margin-right: 15px" @click="modify(scope.row.id)">修改
  159. </el-tag>
  160. <el-tag type="success" style="cursor: pointer; margin-right: 15px" @click="recover(scope.row.id)"
  161. v-if="scope.row.status == 1">恢复
  162. </el-tag>
  163. <el-tag type="danger" style="cursor: pointer; margin-right: 15px" @click="deleteStatus(scope.row.id)"
  164. v-if="scope.row.status == 0">删除</el-tag>
  165. </template>
  166. </el-table-column>
  167. </el-table>
  168. <div class="pagesip">
  169. <el-button type="primary" size="small" style="background-color: #d8ab5a; border-color: #d8ab5a; margin: 0 20px"
  170. @click="jumpFirstPage">首页
  171. </el-button>
  172. <el-pagination background @current-change="handleCurrentChange" layout="total,prev, pager, next" :total="total"
  173. :page-size="pagesize" :current-page="currentPage" prev-text="上一页" next-text="下一页" :hide-on-single-page="false"
  174. ref="pagination">
  175. </el-pagination>
  176. <el-button type="primary" size="small" style="background-color: #d8ab5a; border-color: #d8ab5a; margin: 0 20px"
  177. @click="jumpLastPage">尾页
  178. </el-button>
  179. </div>
  180. </div>
  181. </template>
  182. <script>
  183. import {
  184. dataConversionUtil
  185. } from "../../utils/Excel.js";
  186. import {
  187. getAcceptorSearch
  188. } from "@/api/acceptor";
  189. export default {
  190. filters: {
  191. statusFilter(status) {
  192. const statusMap = {
  193. published: "success",
  194. draft: "gray",
  195. deleted: "danger",
  196. };
  197. return statusMap[status];
  198. },
  199. },
  200. data() {
  201. return {
  202. // 弹窗显示 1修改信息 2新增
  203. dialogVisible1: false,
  204. dialogVisible2: false,
  205. Status: '',
  206. // 表单数据
  207. formData: {
  208. startTime: "",
  209. endTime: "",
  210. name: "", // 承兑人名称
  211. Status: "", // 承兑人状态
  212. },
  213. // 新增承兑人数据
  214. form: {
  215. name: "",
  216. bankAccount: "",
  217. bankNo: "",
  218. bankName: "",
  219. serviceRate: "",
  220. interest: "",
  221. templateServiceContract:[],
  222. },
  223. // 表单验证
  224. rules: {
  225. name: [{
  226. required: true,
  227. message: '请输入承兑人名称',
  228. trigger: 'blur'
  229. }, ],
  230. serviceRate: [{
  231. required: true,
  232. message: '请输入服务费率',
  233. trigger: 'blur'
  234. }],
  235. interest: [{
  236. required: true,
  237. message: '请输入利率',
  238. trigger: 'blur'
  239. }]
  240. },
  241. // 弹窗修改数据
  242. tableData: {
  243. name: "",
  244. serviceRate: "",
  245. interest: "",
  246. bankNo: "",
  247. bankAccount: "",
  248. bankName: "",
  249. id: "",
  250. templateServiceContract:[],
  251. },
  252. oldTableData: "",
  253. /* 当前页数 */
  254. currentPage: 1,
  255. /* 每页显示个数 */
  256. pagesize: 10,
  257. /* 总条数 */
  258. total: 20,
  259. srcList: [],
  260. list: [],
  261. listLoading: false,
  262. status: "",
  263. search: "",
  264. temporaryList: [],
  265. multipleSelection: [],
  266. hpstatus: "",
  267. checked: false,
  268. value1: "",
  269. value2: "",
  270. exportExcelData1: [], //列表缓存数据
  271. exportExcelData2: [],
  272. };
  273. },
  274. mounted() {
  275. this.checked = this.$store.state.user.checked;
  276. this.getAllList();
  277. },
  278. methods: {
  279. /* 获取列表数据 */
  280. getAllList(searchForm = {
  281. Status:5
  282. }) {
  283. const params = {
  284. pageIndex: this.currentPage,
  285. pageSize: this.pagesize,
  286. };
  287. getAcceptorSearch({
  288. ...params,
  289. ...searchForm,
  290. }).then((res) => {
  291. const {
  292. data
  293. } = res;
  294. console.log(res, "res");
  295. this.temporaryList = data.result;
  296. this.srcList = data.result;
  297. this.total = res.data.total;
  298. });
  299. },
  300. // 新增承兑人
  301. addAcceptor() {
  302. if (this.form.bankAccount) {
  303. if (
  304. this.form.bankAccount.length < 5 ||
  305. this.form.bankAccount.length > 20
  306. ) {
  307. this.$message({
  308. type: "error",
  309. message: "银行账号必须为5~20位!",
  310. });
  311. } else {
  312. this.$request({
  313. url: "/api/Acceptor",
  314. method: "post",
  315. data: this.form,
  316. }).then((res) => {
  317. if (res.code === 200) {
  318. this.$message({
  319. type: "success",
  320. message: "添加成功",
  321. });
  322. this.getAllList();
  323. this.dialogVisible2 = false;
  324. } else {
  325. this.$message({
  326. type: "error",
  327. message: res.msg,
  328. });
  329. }
  330. });
  331. }
  332. } else {
  333. this.$request({
  334. url: "/api/Acceptor",
  335. method: "post",
  336. data: this.form,
  337. }).then((res) => {
  338. if (res.code === 200) {
  339. this.$message({
  340. type: "success",
  341. message: "添加成功",
  342. });
  343. this.getAllList();
  344. this.dialogVisible2 = false;
  345. } else {
  346. this.$message({
  347. type: "error",
  348. message: res.msg,
  349. });
  350. }
  351. });
  352. }
  353. },
  354. toDetail(id) {
  355. this.$router.push({
  356. path: "table/detail",
  357. query: {
  358. id: id,
  359. },
  360. });
  361. },
  362. // 下载合同模板
  363. download(link){
  364. if(link==''){
  365. this.$message({
  366. type: "error",
  367. message: "模板为空",
  368. });
  369. }else{
  370. link.forEach(item=>{
  371. window.open(item)
  372. })
  373. }
  374. },
  375. // 批量恢复
  376. recovers() {
  377. let ids = Array.from(this.multipleSelection, ({
  378. id
  379. }) => id)
  380. let status = Array.from(this.multipleSelection, ({
  381. status
  382. }) => status)
  383. if (status.includes(0)) {
  384. this.$message({
  385. type: 'error',
  386. message: '不能恢复已是正常状态的账号'
  387. })
  388. } else if (ids == "") {
  389. this.$message({
  390. type: 'error',
  391. message: '请选择数据'
  392. })
  393. } else {
  394. this.$request({
  395. url: "/api/Acceptor/manager",
  396. method: "post",
  397. data: {
  398. ids: ids,
  399. operateType: 2,
  400. },
  401. }).then((res) => {
  402. if (res.code == 200) {
  403. this.$message({
  404. type: "success",
  405. message: "恢复成功",
  406. });
  407. this.$refs.multipleTable.clearSelection();
  408. this.multipleSelection = "";
  409. this.getAllList();
  410. } else {
  411. this.$message({
  412. type: "danger",
  413. message: "恢复失败",
  414. });
  415. this.getAllList();
  416. }
  417. });
  418. }
  419. },
  420. recover(id) {
  421. this.$request({
  422. url: "/api/Acceptor/manager",
  423. method: "post",
  424. data: {
  425. ids: [id],
  426. operateType: 2,
  427. },
  428. }).then((res) => {
  429. if (res.code == 200) {
  430. this.$message({
  431. type: "success",
  432. message: "恢复成功",
  433. });
  434. this.getAllList();
  435. } else {
  436. this.$message({
  437. type: "danger",
  438. message: "恢复失败",
  439. });
  440. this.getAllList();
  441. }
  442. });
  443. },
  444. // 批量删除
  445. deleteStatuses() {
  446. let ids = Array.from(this.multipleSelection, ({
  447. id
  448. }) => id)
  449. let status = Array.from(this.multipleSelection, ({
  450. status
  451. }) => status)
  452. if (status.includes(1)) {
  453. this.$message({
  454. type: 'error',
  455. message: '不能删除已是删除状态的账号'
  456. })
  457. } else if (ids == "") {
  458. this.$message({
  459. type: 'error',
  460. message: '请选择数据'
  461. })
  462. } else {
  463. this.$request({
  464. url: "/api/Acceptor/manager",
  465. method: "post",
  466. data: {
  467. ids: ids,
  468. operateType: 1,
  469. },
  470. }).then((res) => {
  471. if (res.code == 200) {
  472. this.$message({
  473. type: "success",
  474. message: "删除成功",
  475. });
  476. this.$refs.multipleTable.clearSelection();
  477. this.multipleSelection = "";
  478. this.getAllList();
  479. } else {
  480. this.$message({
  481. type: "danger",
  482. message: "删除失败",
  483. });
  484. this.getAllList();
  485. }
  486. });
  487. }
  488. },
  489. deleteStatus(id) {
  490. this.$request({
  491. url: "/api/Acceptor/manager",
  492. method: "post",
  493. data: {
  494. ids: [id],
  495. operateType: 1,
  496. },
  497. }).then((res) => {
  498. if (res.code == 200) {
  499. this.$message({
  500. type: "success",
  501. message: "删除成功",
  502. });
  503. this.getAllList();
  504. } else {
  505. this.$message({
  506. type: "danger",
  507. message: "删除失败",
  508. });
  509. this.getAllList();
  510. }
  511. });
  512. },
  513. resetForm() {
  514. this.$refs[form].resetFields();
  515. },
  516. modify(id) {
  517. this.$request({
  518. url: "/api/Acceptor/" + id,
  519. method: "get",
  520. }).then((res) => {
  521. console.log(res);
  522. this.tableData = res.data;
  523. this.tableData.id = id;
  524. this.oldTableData = {
  525. ...this.tableData
  526. };
  527. });
  528. this.dialogVisible1 = true;
  529. },
  530. // 弹窗修改
  531. onSubmit() {
  532. if (
  533. JSON.stringify(this.oldTableData) === JSON.stringify(this.tableData)
  534. ) {
  535. this.$message({
  536. type: "error",
  537. message: "数据没有改变!",
  538. });
  539. } else if (this.tableData.bankAccount) {
  540. if (this.tableData.bankAccount.length < 5 ||
  541. this.tableData.bankAccount.length > 20) {
  542. this.$message({
  543. type: "error",
  544. message: "银行账号必须为5~20位!",
  545. });
  546. } else {
  547. this.$request({
  548. url: "/api/Acceptor/update",
  549. method: "post",
  550. data: this.tableData,
  551. }).then((res) => {
  552. if (res.code == 200) {
  553. this.$message({
  554. type: "success",
  555. message: "修改成功!",
  556. });
  557. this.getAllList();
  558. this.$alert('请确认平台服务合同模板保持更新', '注意', {
  559. confirmButtonText: '确定',
  560. });
  561. } else {
  562. this.$message({
  563. type: "danger",
  564. message: "修改失败!",
  565. });
  566. }
  567. });
  568. this.dialogVisible1 = false;
  569. }
  570. }else{
  571. this.$request({
  572. url: "/api/Acceptor/update",
  573. method: "post",
  574. data: this.tableData,
  575. }).then((res) => {
  576. if (res.code == 200) {
  577. this.$message({
  578. type: "success",
  579. message: "修改成功!",
  580. });
  581. this.getAllList();
  582. this.$alert('请确认平台服务合同模板保持更新', '注意', {
  583. confirmButtonText: '确定',
  584. });
  585. } else {
  586. this.$message({
  587. type: "danger",
  588. message: "修改失败!",
  589. });
  590. }
  591. });
  592. this.dialogVisible1 = false;
  593. }
  594. },
  595. /* 输入承兑人状态查询 */
  596. handleCommand(command) {
  597. this.Status = command;
  598. if (command === "正常") {
  599. this.formData.Status = 5;
  600. }
  601. if (command === "删除") {
  602. this.formData.Status = 4;
  603. }
  604. if (command === "全部") {
  605. this.formData.Status = "";
  606. }
  607. this.currentPage = 1;
  608. this.searchForm = {
  609. ...this.formData,
  610. };
  611. console.log(this.searchForm)
  612. this.getAllList(this.searchForm);
  613. },
  614. /* 输入承兑人名称查询 */
  615. Search() {
  616. this.currentPage = 1;
  617. this.searchForm = {
  618. ...this.formData,
  619. };
  620. this.getAllList(this.searchForm);
  621. },
  622. /* 分页功能,改变当前页 */
  623. handleCurrentChange(val) {
  624. this.currentPage = val;
  625. this.getAllList(this.searchForm);
  626. },
  627. /* 分页功能去首页 */
  628. jumpFirstPage() {
  629. this.$refs.pagination.handleCurrentChange(1);
  630. this.$emit("handleCurrentChange", 1);
  631. },
  632. /* 分页功能:去尾页 */
  633. jumpLastPage() {
  634. let font = this.$refs.pagination;
  635. let cpage = Math.ceil(font.total / font.pageSize);
  636. font.handleCurrentChange(cpage);
  637. },
  638. getRowKey(row) {
  639. return row.id;
  640. },
  641. /* 批量导出数据 */
  642. handleSelectionChange(data) {
  643. this.multipleSelection = data;
  644. console.log(this.multipleSelection);
  645. },
  646. handleAll(data) {
  647. this.multipleSelection = data;
  648. },
  649. /* 导出 */
  650. batchExports() {
  651. if (this.multipleSelection == "") {
  652. this.Exports();
  653. } else {
  654. var tableHeader = [
  655. [
  656. "序号",
  657. "承兑人名称",
  658. "账号",
  659. "开户行名称",
  660. "开户行行号",
  661. "服务费率(%)",
  662. "利率(%)",
  663. "状态",
  664. "时间",
  665. ],
  666. ];
  667. var dataList = [];
  668. this.multipleSelection.forEach((item, index) => {
  669. dataList.push([
  670. index + 1,
  671. item.name,
  672. item.bankAccount,
  673. item.bankName,
  674. item.bankNo,
  675. item.serviceRate,
  676. item.interest,
  677. item.statusText,
  678. item.createdAt,
  679. ]);
  680. });
  681. dataConversionUtil.dataToExcel("承兑人列表", tableHeader, dataList);
  682. this.$message.success("导出成功!");
  683. }
  684. },
  685. /* 全部导出 */
  686. Exports() {
  687. const data = {
  688. pageIndex: "",
  689. pageSize: -1,
  690. startTime: "",
  691. endTime: "",
  692. name: "",
  693. contractStatus: "",
  694. approveStatus: "",
  695. draftStatus: "",
  696. supplierId: "",
  697. };
  698. getAcceptorSearch({
  699. ...data
  700. }).then((res) => {
  701. const {
  702. result
  703. } = res.data;
  704. this.multipleSelection = result;
  705. var tableHeader = [
  706. [
  707. "序号",
  708. "承兑人名称",
  709. "账号",
  710. "开户行名称",
  711. "开户行行号",
  712. "服务费率(%)",
  713. "利率(%)",
  714. "状态",
  715. "时间",
  716. ],
  717. ];
  718. var dataList = [];
  719. this.multipleSelection.forEach((item, index) => {
  720. dataList.push([
  721. index + 1,
  722. item.name,
  723. item.bankAccount,
  724. item.bankName,
  725. item.bankNo,
  726. item.serviceRate,
  727. item.interest,
  728. item.statusText,
  729. item.createdAt,
  730. ]);
  731. });
  732. dataConversionUtil.dataToExcel("承兑人列表", tableHeader, dataList);
  733. this.$message.success("导出成功!");
  734. });
  735. },
  736. },
  737. };
  738. </script>
  739. <style lang="scss" scoped>
  740. .pulldown {
  741. width: 185px;
  742. height: 40px;
  743. border: 1px solid #e8e8e8;
  744. border-radius: 10px;
  745. display: flex;
  746. justify-content: center;
  747. align-items: center;
  748. justify-content: space-between;
  749. padding: 0 20px;
  750. color: #999999;
  751. }
  752. .pagesip {
  753. width: 100%;
  754. display: flex;
  755. justify-content: flex-end;
  756. margin-top: 20px;
  757. }
  758. .el-pagination.is-background .el-pager li:not(.disabled).active {
  759. background-color: #d8ab5a;
  760. }
  761. .el-col {
  762. margin-bottom: 20px;
  763. }
  764. </style>