_id.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <template>
  2. <div class="storage">
  3. <div class="com-mobile-header mobile-center-header">
  4. <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
  5. <p v-text="storageList.type === 'INBOUND' ? '查看入库记录' : '查看出库记录'"></p>
  6. <p class="en-name"><img :src="`/images/mobile/center/${user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}</p>
  7. </div>
  8. <div class="mobile-fix-content mobile-centerfix-content" id="mobile-storage-center">
  9. <div class="storage-record">
  10. <div class="storage-info">
  11. <div class="linetext">{{storageList.type === 'INBOUND' ? '入库单' : '出库单'}}<span v-text="storageList.inOutId"></span></div>
  12. <div class="linetext">{{storageList.type === 'INBOUND' ? '卖家名称' : '买家名称'}}<span v-text="storageList.affiliatedEnterprise">21324</span></div>
  13. <div class="linetext">所属订单: <span v-text="storageList.associateOrderid || '-'">21324</span></div>
  14. <div class="linetext">类型: <span v-text="setFilterType(storageList.opertatorType)">21324</span></div>
  15. <div class="linetext" v-if="storageList.logistics">物流公司: <span v-text="storageList.logistics ? storageList.logistics.companyName : '-'">323425</span></div>
  16. <div class="linetext" v-if="storageList.logistics">物流单号:<span v-text="storageList.logistics ? storageList.logistics.number : '-'">34254</span></div>
  17. <div class="linetext">录入人: <span v-text="storageList.operaterUserName || '-'">21324</span></div>
  18. <div class="linetext">录入时间: <span v-text="storageList.createTime ? baseUtils.formatDate(new Date(storageList.createTime), 'yyyy-MM-dd hh:mm:ss') : '-'">21324</span></div>
  19. </div>
  20. <ul class="list-unstyled" v-if="storageList.inOutboundDetails">
  21. <li class="info-list clearfix" v-for="(item, index) in storageList.inOutboundDetails">
  22. <span class="super"><em v-text="index + 1">1</em></span>
  23. <div class="linetext width50 fl">型号: <span v-text="item.cmpCode || '-'">21324</span></div>
  24. <div class="linetext width50 fl">品牌: <span v-text="item.brandEn || '-'">21324</span></div>
  25. <div class="linetext width50 fl">物料名称: <span v-text="item.kindName || '-'">21324</span></div>
  26. <div class="linetext width50 fl">规格: <span v-text="item.spec || '-'">21324</span></div>
  27. <div class="linetext width50 fl">{{storageList.type === 'INBOUND' ? '入库数' : '出库数'}}(PCS): <span v-text="item.qty || '-'">21324</span></div>
  28. <div class="linetext width50 fl">单价({{currency === 'RMB' ? '¥': '$'}}): <span class="base-color" v-text="item.price || '-'">21324</span></div>
  29. </li>
  30. </ul>
  31. </div>
  32. </div>
  33. <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
  34. </div>
  35. </template>
  36. <script>
  37. import { RemindBox, PullUp, EmptyStatus } from '~components/mobile/common'
  38. export default {
  39. middleware: 'authenticated',
  40. layout: 'mobile',
  41. fetch({route, store}) {
  42. return Promise.all([
  43. store.dispatch('product/getLoadStorageId', {id:route.params.id})
  44. ])
  45. },
  46. data () {
  47. return {
  48. remindText: '',
  49. timeoutCount: 0
  50. }
  51. },
  52. components: {
  53. RemindBox,
  54. PullUp,
  55. EmptyStatus
  56. },
  57. computed: {
  58. storageList () {
  59. return this.$store.state.product.storage.detail.data
  60. }
  61. },
  62. methods: {
  63. onRemind: function (str) {
  64. this.remindText = str
  65. this.timeoutCount++
  66. },
  67. setFilterType (type) {
  68. let bound = ''
  69. if(type === 'OTHER_INBOUND') {
  70. bound = '其他入库'
  71. } else if(type === 'OTHER_OUTBOUND'){
  72. bound = '其他出库'
  73. } else if (type === 'PURCHASE_INBOUND') {
  74. bound = '采购入库'
  75. } else if(type === 'SELL_OUTBOUND') {
  76. bound = '销售出库'
  77. } else {
  78. bound = '全部类型'
  79. }
  80. return bound
  81. }
  82. }
  83. }
  84. </script>
  85. <style lang="scss" scoped>
  86. $base-color: #3f84f6;
  87. $title-color: #ffa200;
  88. #mobile-storage-center {
  89. padding-bottom: .5rem;
  90. margin: 0 auto;
  91. }
  92. .storage-record{
  93. padding: 0.24rem 0.24rem;
  94. margin: 0 auto;
  95. .storage-info{
  96. padding: 0.24rem 0.24rem;
  97. background: #fff;
  98. margin-bottom:.2rem;
  99. }
  100. .linetext{
  101. color:#666;
  102. line-height: .6rem;
  103. overflow: hidden;
  104. -o-text-overflow: ellipsis;
  105. text-overflow: ellipsis;
  106. white-space: nowrap;
  107. span{
  108. color:#333;
  109. &.base-color{
  110. color:$base-color;
  111. }
  112. }
  113. }
  114. .info-list{
  115. position:relative;
  116. padding: 0.3rem 0.24rem;
  117. background: #fff;
  118. margin-bottom:.2rem;
  119. .width50{
  120. display:inline-block;
  121. width: 48%;
  122. margin-left: .1rem;
  123. }
  124. >span{
  125. display:inline-block;
  126. position:absolute;
  127. left:0;
  128. top:0;
  129. padding: 0 .1rem;
  130. background: $title-color;
  131. border-radius: 0 .5rem .5rem 0;
  132. line-height: .3rem;
  133. height:.3rem;
  134. color:#fff;
  135. font-size: .24rem;
  136. }
  137. }
  138. }
  139. </style>