HwTaxPaymentList.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. <template>
  2. <a-modal
  3. :title="title"
  4. :width="modelStyle.width"
  5. :bodyStyle="bodyStyle"
  6. :visible="visible"
  7. :confirmLoading="confirmLoading"
  8. :maskClosable="false"
  9. @ok="handleOk"
  10. @cancel="handleCancel"
  11. cancelText="关闭">
  12. <a-card :bordered="false">
  13. <!-- table区域-begin -->
  14. <div>
  15. <a-table
  16. ref="table"
  17. size="middle"
  18. bordered
  19. rowKey="id"
  20. :columns="columns"
  21. :dataSource="dataSource"
  22. :pagination="ipagination"
  23. :loading="loading"
  24. @change="handleTableChange">
  25. <span slot="action1" slot-scope="text, record">
  26. <a @click="viewTaxPayment(record)" >查看</a>
  27. </span>
  28. <span slot="action" slot-scope="text, record">
  29. <a @click="viewTaxPaymentDetail(record)" >业务明细</a>
  30. </span>
  31. </a-table>
  32. </div>
  33. <hw-picture-modal ref="hwViewPictureForm" @ok="modalFormOk"></hw-picture-modal>
  34. <hw-tax-payment-details-list ref="hwTaxPaymentDetailForm" @ok="modalFormOk"></hw-tax-payment-details-list>
  35. </a-card>
  36. </a-modal>
  37. </template>
  38. <script>
  39. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  40. import { getAction, deleteAction, putAction, postAction } from '@/api/manage'
  41. import HwPictureModal from '../tools/HwPictureModal'
  42. import HwTaxPaymentDetailsList from './HwTaxPaymentDetailsList'
  43. export default {
  44. name: 'HwTaxPaymentList',
  45. mixins: [JeecgListMixin],
  46. components: {
  47. HwTaxPaymentDetailsList,
  48. HwPictureModal
  49. },
  50. data() {
  51. return {
  52. description: 'hw_enrollment管理页面',
  53. headers: {},
  54. fileList: [],
  55. form: this.$form.createForm(this),
  56. title: '操作',
  57. bodyStyle: {
  58. padding: '0',
  59. height: (window.innerHeight * 0.66) + 'px',
  60. 'overflow-y': 'auto'
  61. },
  62. modelStyle: {
  63. width: '80%',
  64. style: { top: '20px' },
  65. fullScreen: false
  66. },
  67. visible: false,
  68. model: {},
  69. labelCol: {
  70. xs: { span: 24 },
  71. sm: { span: 5 }
  72. },
  73. wrapperCol: {
  74. xs: { span: 24 },
  75. sm: { span: 16 }
  76. },
  77. accept: '.pdf',
  78. confirmLoading: false,
  79. validatorRules: {},
  80. // 表头
  81. columns: [
  82. {
  83. title: '完税时间',
  84. align: 'center',
  85. dataIndex: 'uploadTime'
  86. },
  87. {
  88. title: '收入金额(不含税)',
  89. align: 'center',
  90. dataIndex: 'sumNetPayment'
  91. },
  92. {
  93. title: '纳税金额',
  94. align: 'center',
  95. dataIndex: 'sumTaxFee'
  96. },
  97. {
  98. title: '完税记录',
  99. align: 'center',
  100. dataIndex: 'taxPaymentReceipt',
  101. scopedSlots: { customRender: 'action1' }
  102. },
  103. {
  104. title: '发票号',
  105. align: 'center',
  106. dataIndex: 'receiptNumber'
  107. },
  108. {
  109. title: '操作',
  110. dataIndex: 'action',
  111. align: 'center',
  112. scopedSlots: { customRender: 'action' }
  113. }
  114. ],
  115. url: {
  116. list: '/hwsupervise/hwTaxPayment/list',
  117. imgerver: window._CONFIG['imgDomainOssURL']
  118. },
  119. dictOptions: {}
  120. }
  121. },
  122. computed: {},
  123. methods: {
  124. close() {
  125. this.visible = false
  126. },
  127. edit(record) {
  128. this.form.resetFields()
  129. this.model = Object.assign({}, record);
  130. this.visible = true
  131. this.loadData(this.model.id,this.model.paymentResultTime_begin,this.model.paymentResultTime_end)
  132. },
  133. handleOk() {
  134. this.close()
  135. this.visible = false
  136. },
  137. handleCancel() {
  138. this.close()
  139. },
  140. loadData(userId,paymentResultTime_begin,paymentResultTime_end) {
  141. if (!this.url.list) {
  142. this.$message.error('请设置url.list属性!')
  143. return
  144. }
  145. var params ={}//查询条件
  146. params.userId = userId
  147. params.paymentResultTime_begin=paymentResultTime_begin
  148. params.paymentResultTime_end=paymentResultTime_end
  149. this.loading = true
  150. getAction(this.url.list, params).then((res) => {
  151. if (res.success) {
  152. this.dataSource = res.result.records
  153. this.ipagination.total = res.result.total
  154. }
  155. if (res.code === 510) {
  156. this.$message.warning(res.message)
  157. }
  158. this.loading = false
  159. })
  160. },
  161. viewTaxPayment(record){
  162. var taxPaymentReceipt=record.taxPaymentReceipt;
  163. console.log(1111,taxPaymentReceipt)
  164. var idcard = [];
  165. if(taxPaymentReceipt){
  166. if( taxPaymentReceipt.indexOf("http")!=-1){
  167. idcard.push(taxPaymentReceipt)
  168. }else{
  169. idcard.push(this.url.imgerver +taxPaymentReceipt)
  170. }
  171. this.$refs.hwViewPictureForm.edit(idcard);
  172. this.$refs.hwViewPictureForm.title = '完税凭证'
  173. this.$refs.hwViewPictureForm.disableSubmit = false
  174. }else{
  175. this.$message.warning('未上传')
  176. }
  177. },
  178. viewTaxPaymentDetail(record){
  179. this.$refs.hwTaxPaymentDetailForm.edit(record.id,this.model.id);
  180. this.$refs.hwTaxPaymentDetailForm.title = '业务明细'
  181. this.$refs.hwTaxPaymentDetailForm.disableSubmit = false
  182. }
  183. }
  184. }
  185. </script>
  186. <style scoped>
  187. @import '~@assets/less/common.less';
  188. </style>
  189. <style lang="scss" scoped>
  190. </style>