_id.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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. store.dispatch('loadCurrencyData')
  45. ])
  46. },
  47. data () {
  48. return {
  49. remindText: '',
  50. timeoutCount: 0
  51. }
  52. },
  53. components: {
  54. RemindBox,
  55. PullUp,
  56. EmptyStatus
  57. },
  58. computed: {
  59. storageList () {
  60. return this.$store.state.product.storage.detail.data
  61. }
  62. },
  63. methods: {
  64. onRemind: function (str) {
  65. this.remindText = str
  66. this.timeoutCount++
  67. },
  68. setFilterType (type) {
  69. let bound = ''
  70. if(type === 'OTHER_INBOUND') {
  71. bound = '其他入库'
  72. } else if(type === 'OTHER_OUTBOUND'){
  73. bound = '其他出库'
  74. } else if (type === 'PURCHASE_INBOUND') {
  75. bound = '采购入库'
  76. } else if(type === 'SELL_OUTBOUND') {
  77. bound = '销售出库'
  78. } else {
  79. bound = '全部类型'
  80. }
  81. return bound
  82. }
  83. }
  84. }
  85. </script>
  86. <style lang="scss" scoped>
  87. $base-color: #3f84f6;
  88. $title-color: #ffa200;
  89. #mobile-storage-center {
  90. padding-bottom: .5rem;
  91. margin: 0 auto;
  92. }
  93. .storage-record{
  94. padding: 0.24rem 0.24rem;
  95. margin: 0 auto;
  96. .storage-info{
  97. padding: 0.24rem 0.24rem;
  98. background: #fff;
  99. margin-bottom:.2rem;
  100. }
  101. .linetext{
  102. color:#666;
  103. line-height: .6rem;
  104. overflow: hidden;
  105. -o-text-overflow: ellipsis;
  106. text-overflow: ellipsis;
  107. white-space: nowrap;
  108. span{
  109. color:#333;
  110. &.base-color{
  111. color:$base-color;
  112. }
  113. }
  114. }
  115. .info-list{
  116. position:relative;
  117. padding: 0.3rem 0.24rem;
  118. background: #fff;
  119. margin-bottom:.2rem;
  120. .width50{
  121. display:inline-block;
  122. width: 48%;
  123. margin-left: .1rem;
  124. }
  125. >span{
  126. display:inline-block;
  127. position:absolute;
  128. left:0;
  129. top:0;
  130. padding: 0 .1rem;
  131. background: $title-color;
  132. border-radius: 0 .5rem .5rem 0;
  133. line-height: .3rem;
  134. height:.3rem;
  135. color:#fff;
  136. font-size: .24rem;
  137. }
  138. }
  139. }
  140. </style>