detail.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <template>
  2. <div class="purchaseOrderDetail-wrap">
  3. <a-page-header :ghost="false" @back="handleBack" >
  4. <!-- 自定义的二级文字标题 -->
  5. <template slot="subTitle">
  6. <a id="purchaseOrderDetail-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
  7. </template>
  8. <!-- 操作区,位于 title 行的行尾 -->
  9. <template slot="extra">
  10. <a-button key="2" id="purchaseOrderDetail-preview-btn">打印预览</a-button>
  11. <a-button key="1" type="primary" id="purchaseOrderDetail-print-btn">快速打印</a-button>
  12. </template>
  13. </a-page-header>
  14. <!-- 内容 -->
  15. <a-page-header title="单号:CG2021010100001" >
  16. <template slot="tags">
  17. <a-tag color="blue">审核通过</a-tag>
  18. <a-tag color="orange">未结算</a-tag>
  19. </template>
  20. </a-page-header>
  21. <!-- 基础信息 -->
  22. <a-card :bordered="false" class="purchaseOrderDetail-cont">
  23. <a-collapse :activeKey="['1']">
  24. <a-collapse-panel key="1" header="基础信息">
  25. <a-descriptions :column="3">
  26. <a-descriptions-item label="供应商">箭冠营销中心</a-descriptions-item>
  27. <a-descriptions-item label="支付方式">箭冠营销中心</a-descriptions-item>
  28. <a-descriptions-item label="采购员工">箭冠营销中心</a-descriptions-item>
  29. <a-descriptions-item label="收货人">箭冠营销中心</a-descriptions-item>
  30. <a-descriptions-item label="收货地址">箭冠营销中心</a-descriptions-item>
  31. </a-descriptions>
  32. </a-collapse-panel>
  33. </a-collapse>
  34. </a-card>
  35. <!-- 产品详情 -->
  36. <a-card :bordered="false" class="purchaseOrderDetail-cont">
  37. <a-collapse :activeKey="['1']">
  38. <a-collapse-panel key="1" header="产品详情">
  39. <!-- 总计 -->
  40. <a-alert type="info" showIcon style="margin-bottom:15px">
  41. <div slot="message">产品款数 <strong>6</strong> ,采购数量合计 <strong>6</strong> ,采购金额合计¥<strong>6.33</strong></div>
  42. </a-alert>
  43. <!-- 列表 -->
  44. <s-table
  45. class="sTable"
  46. ref="table"
  47. size="default"
  48. :rowKey="(record) => record.id"
  49. :columns="columns"
  50. :data="loadData"
  51. bordered>
  52. <!-- 采购数量 -->
  53. <template slot="purchaseNum" slot-scope="text, record">
  54. <span>{{record.purchaseNum}}</span>
  55. </template>
  56. <!-- 缺货数量 -->
  57. <template slot="outOfStockNum" slot-scope="text, record">
  58. <span>{{record.outOfStockNum}}</span>
  59. </template>
  60. </s-table>
  61. </a-collapse-panel>
  62. </a-collapse>
  63. </a-card>
  64. <!-- 单据记录 -->
  65. <a-card :bordered="false" class="purchaseOrderDetail-cont">
  66. <a-collapse :activeKey="['1']">
  67. <a-collapse-panel key="1" header="单据记录">
  68. <a-timeline class="timeline-box">
  69. <a-timeline-item>2021-02-01 15:22:38 王凯 审核通过</a-timeline-item>
  70. <a-timeline-item>
  71. <p>2021-02-01 15:22:38 王凯 审核通过</p>
  72. <p class="auxiliary-txt">产品编号JA-11076P的采购数量,由【10】修改为【5】</p>
  73. <p class="auxiliary-txt">产品编号JA-11076P的采购数量,由【10】修改为【5】</p>
  74. </a-timeline-item>
  75. <a-timeline-item>Technical testing 2015-09-01</a-timeline-item>
  76. <a-timeline-item>Network problems being solved 2015-09-01</a-timeline-item>
  77. </a-timeline>
  78. </a-collapse-panel>
  79. </a-collapse>
  80. </a-card>
  81. </div>
  82. </template>
  83. <script>
  84. import { STable, VSelect } from '@/components'
  85. export default{
  86. components: { STable, VSelect },
  87. data(){
  88. return{
  89. // 表头
  90. columns: [
  91. { title: '序号', dataIndex: 'no', align: 'center' },
  92. { title: '产品编码', dataIndex: 'creatDate', align: 'center' },
  93. { title: '产品名称', dataIndex: 'custName', align: 'center' },
  94. { title: '原厂编码', dataIndex: 'totalP', align: 'center' },
  95. { title: '采购单价', dataIndex: 'totalNums', align: 'center' },
  96. { title: '采购数量', scopedSlots: { customRender: 'purchaseNum' }, align: 'center' },
  97. { title: '缺货数量', scopedSlots: { customRender: 'outOfStockNum' }, align: 'center' },
  98. { title: '单位', dataIndex: 'mementPay', align: 'center' },
  99. { title: '采购金额', dataIndex: 'shDate', align: 'center' },
  100. ],
  101. // 加载数据方法 必须为 Promise 对象
  102. loadData: parameter => {
  103. this.disabled = true
  104. // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
  105. // const data = res.data
  106. // const no = (data.pageNo - 1) * data.pageSize
  107. // for (var i = 0; i < data.list.length; i++) {
  108. // data.list[i].no = no + i + 1
  109. // }
  110. // this.disabled = false
  111. // return data
  112. // })
  113. const _this = this
  114. return new Promise(function(resolve, reject){
  115. const data = {
  116. pageNo: 1,
  117. pageSize: 10,
  118. list: [
  119. { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
  120. ],
  121. count: 10
  122. }
  123. const no = (data.pageNo - 1) * data.pageSize
  124. for (var i = 0; i < data.list.length; i++) {
  125. data.list[i].no = no + i + 1
  126. }
  127. _this.disabled = false
  128. resolve(data)
  129. })
  130. },
  131. }
  132. },
  133. methods: {
  134. // 返回列表
  135. handleBack(){
  136. this.$router.push({ path: '/purchasingManagement/purchaseOrder/list'})
  137. },
  138. }
  139. }
  140. </script>
  141. <style lang="less">
  142. .purchaseOrderDetail-cont{
  143. margin-bottom: 15px;
  144. .timeline-box{
  145. margin-top: 30px;
  146. .auxiliary-txt{
  147. color: #808695;
  148. }
  149. }
  150. }
  151. </style>