detail.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <template>
  2. <div class="companyCollectionPaymentDetail-wrap">
  3. <a-page-header :ghost="false" :backIcon="false" class="companyCollectionPaymentDetail-cont" >
  4. <!-- 自定义的二级文字标题 -->
  5. <template slot="subTitle">
  6. <a id="companyCollectionPaymentDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
  7. <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">单号:{{ (basicInfoData&&basicInfoData.unitSettleNo) || '--' }}</p>
  8. </template>
  9. <!-- 操作区,位于 title 行的行尾 -->
  10. <template slot="extra">
  11. <a-button key="2" id="companyCollectionPaymentDetail-preview-btn">打印预览</a-button>
  12. <a-button key="1" type="primary" id="companyCollectionPaymentDetail-print-btn">快速打印</a-button>
  13. </template>
  14. </a-page-header>
  15. <!-- 基础信息 -->
  16. <a-card size="small" :bordered="false" class="companyCollectionPaymentDetail-cont">
  17. <a-collapse :activeKey="['1']">
  18. <a-collapse-panel key="1" header="基础信息">
  19. <a-descriptions :column="3">
  20. <a-descriptions-item label="单位名称">箭冠营销中心</a-descriptions-item>
  21. <a-descriptions-item label="单位类型">箭冠营销中心</a-descriptions-item>
  22. <a-descriptions-item label="结算类型">箭冠营销中心</a-descriptions-item>
  23. <a-descriptions-item label="收款金额">2</a-descriptions-item>
  24. <a-descriptions-item label="折让金额">20</a-descriptions-item>
  25. <a-descriptions-item label="结算金额">¥120.36</a-descriptions-item>
  26. <a-descriptions-item label="结算时间">3</a-descriptions-item>
  27. <a-descriptions-item label="操作人">4</a-descriptions-item>
  28. <a-descriptions-item label="结算方式">¥11.2</a-descriptions-item>
  29. </a-descriptions>
  30. </a-collapse-panel>
  31. </a-collapse>
  32. </a-card>
  33. <!-- 收款明细 -->
  34. <a-card size="small" :bordered="false" class="companyCollectionPaymentDetail-cont">
  35. <a-collapse :activeKey="['1']">
  36. <a-collapse-panel key="1" header="收款明细">
  37. <!-- alert -->
  38. <a-alert type="info" showIcon style="margin-bottom:15px">
  39. <div slot="message">共 <strong>6</strong> 条明细,金额合计 <strong>¥{{ (productTotal&&productTotal.totalAmount) || 0 }}</strong> ,结算金额合计 <strong>¥{{ (productTotal&&productTotal.settleAmount) || 0 }}</strong> </div>
  40. </a-alert>
  41. <!-- 列表 -->
  42. <s-table
  43. class="sTable"
  44. ref="table"
  45. size="default"
  46. :rowKey="(record) => record.id"
  47. :columns="columns"
  48. :data="loadData"
  49. bordered>
  50. </s-table>
  51. </a-collapse-panel>
  52. </a-collapse>
  53. </a-card>
  54. </div>
  55. </template>
  56. <script>
  57. import { STable, VSelect } from '@/components'
  58. import { settleUnitDetailList, settleUnitDetail } from '@/api/settle'
  59. export default {
  60. components: { STable, VSelect },
  61. data () {
  62. return {
  63. // 表头
  64. columns: [
  65. { title: '序号', dataIndex: 'no', align: 'center' },
  66. { title: '单据号', dataIndex: 'bizNo', align: 'center', customRender: function (text) { return text || '--' } },
  67. { title: '类型', dataIndex: 'bizTypeDictValue', align: 'center', customRender: function (text) { return text || '--' } },
  68. { title: '金额', dataIndex: 'totalAmount', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  69. { title: '结算金额', dataIndex: 'settleAmount', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
  70. ],
  71. // 加载数据方法 必须为 Promise 对象
  72. loadData: parameter => {
  73. this.disabled = true
  74. return settleUnitDetailList(Object.assign(parameter, this.queryParam)).then(res => {
  75. const data = res.data
  76. const no = (data.pageNo - 1) * data.pageSize
  77. for (var i = 0; i < data.list.length; i++) {
  78. data.list[i].no = no + i + 1
  79. }
  80. this.disabled = false
  81. return data
  82. })
  83. },
  84. basicInfoData: null // 基本信息
  85. }
  86. },
  87. methods: {
  88. // 返回列表
  89. handleBack () {
  90. this.$router.push({ path: '/financialManagement/companyCollectionPayment/list' })
  91. },
  92. // 详情
  93. getDetail () {
  94. settleUnitDetail({ id: this.$route.params.id }).then(res => {
  95. if (res.status == 200) {
  96. this.basicInfoData = res.data
  97. } else {
  98. this.basicInfoData = null
  99. }
  100. })
  101. }
  102. },
  103. beforeRouteEnter (to, from, next) {
  104. next(vm => {
  105. vm.getDetail()
  106. })
  107. }
  108. }
  109. </script>
  110. <style lang="less">
  111. .companyCollectionPaymentDetail-cont{
  112. margin-bottom: 15px;
  113. }
  114. </style>