invoiceSellerList.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <template>
  2. <div class="form-wrap">
  3. <div class="tableBox">
  4. <div class="block-title">查询信息</div>
  5. <el-table
  6. stripe
  7. :data="tableData"
  8. v-loading="loading">
  9. <el-table-column
  10. label="销售方名称"
  11. prop="invoiceSellerName"></el-table-column>
  12. <el-table-column
  13. label="纳税人识别号"
  14. prop="invoiceSellerTaxpayerNum">
  15. </el-table-column>
  16. <el-table-column
  17. prop="invoiceSellerAddress"
  18. label="销售方地址">
  19. </el-table-column>
  20. <el-table-column
  21. prop="invoiceSellerPhone"
  22. label="销售方联系电话">
  23. </el-table-column>
  24. <el-table-column
  25. prop="invoiceSellerBank"
  26. label="销售方开户银行">
  27. </el-table-column>
  28. <el-table-column
  29. prop="invoiceSellerAccount"
  30. label="销售方银行账号">
  31. </el-table-column>
  32. <el-table-column
  33. v-if="canEdit"
  34. width="120"
  35. label="操作">
  36. <template slot-scope="scope">
  37. <el-button
  38. type="text"
  39. @click="showDialog('edit', scope.row)">
  40. <i class="el-icon-edit"></i>
  41. 编辑
  42. </el-button>
  43. </template>
  44. </el-table-column>
  45. </el-table>
  46. <!-- <el-pagination
  47. background
  48. :current-page.sync="form.pageNum"
  49. @current-change="getList"
  50. layout="total, prev, pager, next"
  51. :total="total">
  52. </el-pagination> -->
  53. </div>
  54. <ElDialog
  55. :title="'编辑'"
  56. width="800px"
  57. v-model="dialogVisible">
  58. <EditDialog
  59. :current-item="currentItem"
  60. @updateList="getList"></EditDialog>
  61. </ElDialog>
  62. </div>
  63. </template>
  64. <script>
  65. import { getInvoiceSellerList } from '@/api/invoice'
  66. import ElDialog from '@/components/Dialog'
  67. import EditDialog from './invoiceSeller/Dialog'
  68. export default {
  69. components: {
  70. ElDialog,
  71. EditDialog
  72. },
  73. data () {
  74. return {
  75. projectName: localStorage.getItem('otaProject'),
  76. performList: [],
  77. dialogType: 'add',
  78. dialogVisible: false,
  79. form: {
  80. pageNum: 1,
  81. pageSize: -1,
  82. isSale: '',
  83. otaSourceId: '',
  84. ticketTypeId: '',
  85. salePrice: '',
  86. otaProductId: ''
  87. },
  88. loading: false,
  89. multipleSelection: [], // 批量删除多选数组
  90. total: 0,
  91. tableData: [],
  92. currentItem: {},
  93. ticketTypeList: [], // 票种列表
  94. otaList: []
  95. }
  96. },
  97. created () {
  98. this.getList()
  99. },
  100. filters: {
  101. formatXCProductName (time) {
  102. if (!time) return ''
  103. const map = {
  104. '1': '一张一人需要证件',
  105. '2': '一张一人不需要证件',
  106. '3': '一单一人需要证件',
  107. '4': '一单一人不需要证件'
  108. }
  109. return map[time] || ''
  110. }
  111. },
  112. computed: {
  113. canEdit () {
  114. return true
  115. // return this.$store.state.user.permissionList.includes('product:pricecode_edit')
  116. },
  117. queryClear () {
  118. return this.$store.state.user.permissionList.includes('stats:clearwx_query')
  119. }
  120. },
  121. methods: {
  122. // 获取列表
  123. getList () {
  124. this.loading = true
  125. getInvoiceSellerList(this.form).then(res => {
  126. this.tableData = res.data || []
  127. this.loading = false
  128. })
  129. },
  130. // 打开编辑对话框
  131. showDialog (type, item) {
  132. this.dialogType = type
  133. this.currentItem = item || {}
  134. this.dialogVisible = true
  135. }
  136. }
  137. }
  138. </script>