warehouseDetail.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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 v-if="paramsData">
  44. <text v-if="paramsData.unitType&&paramsData.unitType=='CUSTOMER'">{{ paramsData.unitNameCurrent||'--' }}</text>
  45. <text v-else>{{ paramsData.unitName||'--' }}</text>
  46. </view>
  47. </view>
  48. <view class="info-item flex align_center justify_between">
  49. <view class="info-name">批次号</view>
  50. <view>{{paramsData && paramsData.stockBatchNo || '--'}}</view>
  51. </view>
  52. <view class="info-item flex align_center justify_between">
  53. <view class="info-name">关联单据号</view>
  54. <view>{{paramsData && paramsData.bizNo || '--'}}</view>
  55. </view>
  56. <view class="info-item flex align_center justify_between">
  57. <view class="info-name">仓库</view>
  58. <view>{{paramsData && paramsData.warehouseName || '--'}}</view>
  59. </view>
  60. <view class="info-item flex align_center justify_between">
  61. <view class="info-name">仓位</view>
  62. <view>{{paramsData && paramsData.warehouseLocationName || '--'}}</view>
  63. </view>
  64. <view class="info-item flex align_center justify_between" v-if="$hasPermissions('M_showCostPrice_mobile')">
  65. <view class="info-name">总成本</view>
  66. <view>¥{{toThousands(paramsData && paramsData.totalCost || 0, 2)}}</view>
  67. </view>
  68. <view class="info-item flex align_center justify_between">
  69. <view class="info-name">总售价</view>
  70. <view>¥{{toThousands(paramsData && paramsData.totalPrice || 0, 2)}}</view>
  71. </view>
  72. <view class="info-item flex align_center justify_between">
  73. <view class="info-name">出入库状态</view>
  74. <view>{{paramsData && paramsData.stateDictValue || '--'}}</view>
  75. </view>
  76. </view>
  77. </view>
  78. </template>
  79. <script>
  80. import { toThousands } from '@/libs/tools'
  81. export default{
  82. data(){
  83. return {
  84. productData: null,
  85. paramsData: null,
  86. theme: '',
  87. toThousands
  88. }
  89. },
  90. onLoad(option) {
  91. this.theme = getApp({ allowDefault: true }).globalData.theme
  92. this.productData = option.productData ? JSON.parse(option.productData) : null
  93. this.paramsData = option.data ? JSON.parse(option.data) : null
  94. },
  95. methods: {}
  96. }
  97. </script>
  98. <style lang="scss">
  99. .warehouseDetail-wrap{
  100. width: 100%;
  101. padding: 30upx;
  102. .panel-box {
  103. background-color: #ffffff;
  104. padding: 20upx 20upx;
  105. border-radius: 20upx;
  106. box-shadow: 3upx 2upx 6upx #eee;
  107. margin-bottom: 30upx;
  108. display: flex;
  109. justify-content: space-between;
  110. align-items: center;
  111. .info-con{
  112. margin-left: 20upx;
  113. .padding_7{
  114. padding: 14upx 0 0;
  115. }
  116. }
  117. }
  118. .warehouseDetail-info{
  119. background-color: #ffffff;
  120. padding: 10upx 20upx 20upx;
  121. border-radius: 20upx;
  122. box-shadow: 3upx 2upx 6upx #eee;
  123. .info-item{
  124. border-bottom: 1px dashed #e4e7ed;
  125. padding: 20upx 0;
  126. .info-name{
  127. color: #464646;
  128. }
  129. }
  130. }
  131. }
  132. </style>