stockDetail.vue 2.7 KB

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