stockDetail.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <view class="stockDetail-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="120" height="120" border-radius="10"></u-image>
  6. </view>
  7. <view class="info-con flex_1">
  8. <view class="padding_7">{{productData && productData.productName || '--'}}</view>
  9. <view>{{productData && productData.productCode || '--'}}</view>
  10. </view>
  11. </view>
  12. <view class="stockDetail-info">
  13. <view class="info-item flex align_center justify_between">
  14. <view class="info-name">仓库</view>
  15. <view>{{paramsData && paramsData.warehouseName || '--'}}</view>
  16. </view>
  17. <view class="info-item flex align_center justify_between">
  18. <view class="info-name">仓位</view>
  19. <view>{{paramsData && paramsData.warehouseLocationName || '--'}}</view>
  20. </view>
  21. <view class="info-item flex align_center justify_between">
  22. <view class="info-name">入库时间</view>
  23. <view>{{paramsData && paramsData.putTime || '--'}}</view>
  24. </view>
  25. <view class="info-item flex align_center justify_between">
  26. <view class="info-name">入库类型</view>
  27. <view>{{paramsData && paramsData.putBizTypeDictValue || '--'}}</view>
  28. </view>
  29. <view class="info-item flex align_center justify_between">
  30. <view class="info-name">可用库存数量</view>
  31. <view>{{toThousands(paramsData && paramsData.currentQty || 0)}}</view>
  32. </view>
  33. <view class="info-item flex align_center justify_between">
  34. <view class="info-name">冻结库存数量</view>
  35. <view>{{toThousands(paramsData && paramsData.freezeQty || 0)}}</view>
  36. </view>
  37. <view class="info-item flex align_center justify_between" v-if="$hasPermissions('M_showCostPrice_mobile')">
  38. <view class="info-name">成本单价</view>
  39. <view>¥{{toThousands(paramsData && paramsData.putCost || 0, 2)}}</view>
  40. </view>
  41. </view>
  42. </view>
  43. </template>
  44. <script>
  45. import { toThousands } from '@/libs/tools'
  46. export default{
  47. data(){
  48. return {
  49. productData: null,
  50. paramsData: null,
  51. theme: '',
  52. toThousands
  53. }
  54. },
  55. onLoad(option) {
  56. this.theme = getApp({ allowDefault: true }).globalData.theme
  57. this.productData = option.productData ? JSON.parse(option.productData) : null
  58. this.paramsData = option.data ? JSON.parse(option.data) : null
  59. },
  60. methods: {}
  61. }
  62. </script>
  63. <style lang="scss">
  64. .stockDetail-wrap{
  65. width: 100%;
  66. padding: 30upx;
  67. .panel-box {
  68. background-color: #ffffff;
  69. padding: 20upx 20upx;
  70. border-radius: 20upx;
  71. box-shadow: 3upx 2upx 6upx #eee;
  72. margin-bottom: 30upx;
  73. display: flex;
  74. justify-content: space-between;
  75. align-items: center;
  76. .info-con{
  77. margin-left: 20upx;
  78. .padding_7{
  79. padding: 14upx 0 0;
  80. font-size: 28upx;
  81. }
  82. }
  83. }
  84. .stockDetail-info{
  85. background-color: #ffffff;
  86. padding: 10upx 20upx 20upx;
  87. border-radius: 20upx;
  88. box-shadow: 3upx 2upx 6upx #eee;
  89. .info-item{
  90. border-bottom: 1px dashed #e4e7ed;
  91. padding: 20upx 0;
  92. .info-name{
  93. color: #464646;
  94. }
  95. }
  96. }
  97. }
  98. </style>