warehouseDetail.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <template>
  2. <view class="warehouseDetail-wrap">
  3. <view class="panel-box flex align_center justify_between">
  4. <view class="pimgs">
  5. <u-image :src="productData && productData.productMsg||`../../static/${theme}/def_img@2x.png`" width="128" height="128" border-radius="10"></u-image>
  6. </view>
  7. <view class="info-con flex_1">
  8. <view>{{productData && productData.productCode || '--'}}</view>
  9. <view class="padding_7">{{productData && productData.productName || '--'}}</view>
  10. </view>
  11. </view>
  12. <view class="warehouseDetail-info">
  13. <view class="info-item flex align_center justify_between">
  14. <view class="info-name">变动类型</view>
  15. <view v-if="paramsData && paramsData.flowType">{{paramsData.flowType=='OUT'?'出库':paramsData.flowType=='PUT'?'入库':'--'}}</view>
  16. <view v-else>--</view>
  17. </view>
  18. <view class="info-item flex align_center justify_between">
  19. <view class="info-name">变动数量</view>
  20. <view v-if="paramsData && paramsData.flowType && paramsData.flowType=='PUT'">
  21. <view style="color: green;display: inline-block">
  22. <text v-if="paramsData && paramsData.putQty && paramsData.putQty!=0">+</text>{{ toThousands(paramsData && paramsData.putQty||0) }}
  23. </view>
  24. {{paramsData && paramsData.product && paramsData.product.unit}}
  25. </view>
  26. <view v-if="paramsData && paramsData.flowType && paramsData.flowType=='OUT'">
  27. <view style="color: red;display: inline-block">
  28. <text v-if="paramsData && paramsData.outQty && paramsData.outQty!=0">-</text>{{ toThousands(paramsData && paramsData.outQty||0) }}
  29. </view>
  30. {{paramsData && paramsData.product && paramsData.product.unit}}
  31. </view>
  32. </view>
  33. <view class="info-item flex align_center justify_between">
  34. <view class="info-name">单据类型</view>
  35. <view>{{paramsData && paramsData.bizTypeDictValue || '--'}}</view>
  36. </view>
  37. <view class="info-item flex align_center justify_between">
  38. <view class="info-name">单据审核时间</view>
  39. <view>{{paramsData && paramsData.auditTime || '--'}}</view>
  40. </view>
  41. <view class="info-item flex align_center justify_between">
  42. <view class="info-name">单位名称</view>
  43. <view>{{paramsData && paramsData.unitName || '--'}}</view>
  44. </view>
  45. <view class="info-item flex align_center justify_between">
  46. <view class="info-name">批次号</view>
  47. <view>{{paramsData && paramsData.stockBatchNo || '--'}}</view>
  48. </view>
  49. <view class="info-item flex align_center justify_between">
  50. <view class="info-name">仓库</view>
  51. <view>{{paramsData && paramsData.warehouseName || '--'}}</view>
  52. </view>
  53. <view class="info-item flex align_center justify_between">
  54. <view class="info-name">仓位</view>
  55. <view>{{paramsData && paramsData.warehouseLocationName || '--'}}</view>
  56. </view>
  57. <view class="info-item flex align_center justify_between">
  58. <view class="info-name">总成本</view>
  59. <view>{{toThousands(paramsData && paramsData.totalCost || 0, 2)}}</view>
  60. </view>
  61. <view class="info-item flex align_center justify_between">
  62. <view class="info-name">总售价</view>
  63. <view>{{toThousands(paramsData && paramsData.totalPrice || 0, 2)}}</view>
  64. </view>
  65. </view>
  66. </view>
  67. </template>
  68. <script>
  69. import { toThousands } from '@/libs/tools'
  70. export default{
  71. data(){
  72. return {
  73. productData: null,
  74. paramsData: null,
  75. theme: '',
  76. toThousands
  77. }
  78. },
  79. onLoad(option) {
  80. this.theme = getApp().globalData.theme
  81. this.productData = option.productData ? JSON.parse(option.productData) : null
  82. this.paramsData = option.data ? JSON.parse(option.data) : null
  83. },
  84. methods: {}
  85. }
  86. </script>
  87. <style lang="scss">
  88. .warehouseDetail-wrap{
  89. width: 100%;
  90. padding: 30upx;
  91. .panel-box {
  92. background-color: #ffffff;
  93. padding: 20upx 20upx;
  94. border-radius: 20upx;
  95. box-shadow: 3upx 2upx 6upx #eee;
  96. margin-bottom: 30upx;
  97. display: flex;
  98. justify-content: space-between;
  99. align-items: center;
  100. .info-con{
  101. margin-left: 20upx;
  102. .padding_7{
  103. padding: 14upx 0 0;
  104. }
  105. }
  106. }
  107. .warehouseDetail-info{
  108. background-color: #ffffff;
  109. padding: 10upx 20upx 20upx;
  110. border-radius: 20upx;
  111. box-shadow: 3upx 2upx 6upx #eee;
  112. .info-item{
  113. border-bottom: 1px dashed #e4e7ed;
  114. padding: 20upx 0;
  115. .info-name{
  116. color: #464646;
  117. }
  118. }
  119. }
  120. }
  121. </style>