detail.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <template>
  2. <div class="bulkWarehousingOrderDetail-wrap">
  3. <a-page-header :ghost="false" :backIcon="false" class="bulkWarehousingOrderDetail-cont" >
  4. <!-- 自定义的二级文字标题 -->
  5. <template slot="subTitle">
  6. <a id="bulkWarehousingOrderDetail-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.sparePartsPurchaseSn) || '' }}</p>
  8. </template>
  9. <template slot="tags">
  10. <a-tag color="purple" v-if="basicInfoData&&basicInfoData.stateDictValue">{{ basicInfoData.stateDictValue }}</a-tag>
  11. <a-tag color="orange" v-if="basicInfoData&&basicInfoData.settleStateDictValue">{{ basicInfoData.settleStateDictValue }}</a-tag>
  12. </template>
  13. <!-- 操作区,位于 title 行的行尾 -->
  14. <template slot="extra">
  15. <a-button key="2" id="bulkWarehousingOrderDetail-preview-btn">打印预览</a-button>
  16. <a-button key="1" type="primary" id="bulkWarehousingOrderDetail-print-btn">快速打印</a-button>
  17. </template>
  18. </a-page-header>
  19. <!-- 基础信息 -->
  20. <a-card size="small" :bordered="false" class="bulkWarehousingOrderDetail-cont">
  21. <a-collapse :activeKey="['1']">
  22. <a-collapse-panel key="1" header="基础信息">
  23. <a-descriptions :column="3">
  24. <a-descriptions-item label="供应商">{{ (basicInfoData&&basicInfoData.supplierName) || '' }}</a-descriptions-item>
  25. <a-descriptions-item label="散件入库类型">{{ (basicInfoData&&basicInfoData.sparePartsTypeName) || '' }}</a-descriptions-item>
  26. <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remarks) || '' }}</a-descriptions-item>
  27. <a-descriptions-item label="联系人">{{ (basicInfoData&&basicInfoData.supplierName) || '' }}</a-descriptions-item>
  28. <a-descriptions-item label="联系地址">{{ (basicInfoData&&basicInfoData.supplierName) || '' }}</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="bulkWarehousingOrderDetail-cont">
  35. <a-collapse :activeKey="['1']">
  36. <a-collapse-panel key="1" header="产品详情">
  37. <!-- 总计 -->
  38. <a-alert type="info" showIcon style="margin-bottom:15px">
  39. <div slot="message">产品款数 <strong>6</strong> ,采购数量合计 <strong>6</strong> ,采购金额合计¥<strong>6.33</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. :scroll="{ x: 1080, y: 300 }"
  50. bordered>
  51. <!-- 采购数量 -->
  52. <template slot="purchaseNum" slot-scope="text, record">
  53. <span>{{ record.purchaseNum }}</span>
  54. </template>
  55. <!-- 缺货数量 -->
  56. <template slot="outOfStockNum" slot-scope="text, record">
  57. <span>{{ record.outOfStockNum }}</span>
  58. </template>
  59. </s-table>
  60. </a-collapse-panel>
  61. </a-collapse>
  62. </a-card>
  63. <!-- 单据记录 -->
  64. <a-card size="small" :bordered="false" class="bulkWarehousingOrderDetail-cont">
  65. <a-collapse :activeKey="['1']">
  66. <a-collapse-panel key="1" header="单据记录">
  67. <a-timeline class="timeline-box">
  68. <a-timeline-item>2021-02-01 15:22:38 王凯 审核通过</a-timeline-item>
  69. <a-timeline-item>
  70. <p>2021-02-01 15:22:38 王凯 审核通过</p>
  71. <p class="auxiliary-txt">产品编号JA-11076P的采购数量,由【10】修改为【5】</p>
  72. <p class="auxiliary-txt">产品编号JA-11076P的采购数量,由【10】修改为【5】</p>
  73. </a-timeline-item>
  74. <a-timeline-item>Technical testing 2015-09-01</a-timeline-item>
  75. <a-timeline-item>Network problems being solved 2015-09-01</a-timeline-item>
  76. </a-timeline>
  77. </a-collapse-panel>
  78. </a-collapse>
  79. </a-card>
  80. </div>
  81. </template>
  82. <script>
  83. import { STable, VSelect } from '@/components'
  84. import { sparePartsPurDetail, sparePartsPurDetailList } from '@/api/sparePartsPur'
  85. export default {
  86. components: { STable, VSelect },
  87. data () {
  88. return {
  89. // 表头
  90. columns: [
  91. { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
  92. { title: '产品编码', dataIndex: 'creatDate', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
  93. { title: '产品名称', dataIndex: 'custName', align: 'center', customRender: function (text) { return text || '--' } },
  94. { title: '采购单价', dataIndex: 'totalNums', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  95. { title: '采购数量', dataIndex: 'totaslNums', width: 100, align: 'center' },
  96. { title: '单位', dataIndex: 'mementPay', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
  97. { title: '采购金额', dataIndex: 'shDate', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  98. { title: '仓库', dataIndex: 'shD3ate', width: 100, align: 'center' },
  99. { title: '仓位', dataIndex: 'shDaste', width: 100, align: 'center' }
  100. ],
  101. // 加载数据方法 必须为 Promise 对象
  102. loadData: parameter => {
  103. this.disabled = true
  104. return sparePartsPurDetailList(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. },
  114. basicInfoData: null // 基本信息
  115. }
  116. },
  117. methods: {
  118. // 返回列表
  119. handleBack () {
  120. this.$router.push({ path: '/bulkManagement/bulkWarehousingOrder/list' })
  121. },
  122. // 基本信息
  123. getDetail () {
  124. sparePartsPurDetail({ id: this.$route.params.id }).then(res => {
  125. if (res.status == 200) {
  126. this.basicInfoData = res.data
  127. } else {
  128. this.basicInfoData = null
  129. }
  130. })
  131. }
  132. },
  133. beforeRouteEnter (to, from, next) {
  134. next(vm => {
  135. vm.openModal = false
  136. vm.getDetail()
  137. })
  138. }
  139. }
  140. </script>
  141. <style lang="less">
  142. .bulkWarehousingOrderDetail-cont{
  143. margin-bottom: 15px;
  144. .timeline-box{
  145. margin-top: 30px;
  146. .auxiliary-txt{
  147. color: #808695;
  148. }
  149. }
  150. }
  151. </style>