stockDetail.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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="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="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.putCost || 0, 2)}}</view>
  36. </view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. import { toThousands } from '@/libs/tools'
  42. import { stockList, stockCount } from '@/api/stock'
  43. export default{
  44. data(){
  45. return {
  46. productData: null,
  47. paramsData: null,
  48. theme: '',
  49. toThousands
  50. }
  51. },
  52. onLoad(option) {
  53. this.theme = getApp().globalData.theme
  54. this.productData = option.productData ? JSON.parse(option.productData) : null
  55. this.paramsData = option.data ? JSON.parse(option.data) : null
  56. },
  57. methods: {}
  58. }
  59. </script>
  60. <style lang="scss">
  61. .stockDetail-wrap{
  62. width: 100%;
  63. padding: 30upx;
  64. .panel-box {
  65. background-color: #ffffff;
  66. padding: 20upx 20upx;
  67. border-radius: 20upx;
  68. box-shadow: 3upx 2upx 6upx #eee;
  69. margin-bottom: 30upx;
  70. display: flex;
  71. justify-content: space-between;
  72. align-items: center;
  73. .info-con{
  74. margin-left: 20upx;
  75. .padding_7{
  76. padding: 14upx 0 0;
  77. }
  78. }
  79. }
  80. .stockDetail-info{
  81. background-color: #ffffff;
  82. padding: 10upx 20upx 20upx;
  83. border-radius: 20upx;
  84. box-shadow: 3upx 2upx 6upx #eee;
  85. .info-item{
  86. border-bottom: 1px dashed #e4e7ed;
  87. padding: 20upx 0;
  88. .info-name{
  89. color: #464646;
  90. }
  91. }
  92. }
  93. }
  94. </style>