freezeQtyModal.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <template>
  2. <u-mask class="productModal" :show="isShow" :mask-click-able="false">
  3. <view class="product-con">
  4. <view class="product-head">
  5. <view class="shelfName flex align_center"><text></text>{{infoData.shelfName}}</view>
  6. <view>
  7. 此货架存在以下未取货的订单,导致库存被冻结,为方便盘点,请先联系修理厂处理
  8. </view>
  9. </view>
  10. <view class="product-main">
  11. <view v-for="item in list" :key="item.id">
  12. <view class="flex align_center">
  13. <view class="l-no"><text>{{item.shelfPlaceCode}}</text>{{item.productCode}}</view>
  14. <view class="r-nums">冻结库存:<text>{{item.totalQty}}</text> 个</view>
  15. </view>
  16. <view class="p-name">{{item.productName}}</view>
  17. </view>
  18. </view>
  19. <view class="product-footer">
  20. <view class="button-cancel" @click="isShow=false">返回列表</view>
  21. <view class="button-confirm" @click="handleConfirm">继续盘点</view>
  22. </view>
  23. </view>
  24. </u-mask>
  25. </template>
  26. <script>
  27. import { queryWaitListByShelfSn } from '@/api/stockCheck'
  28. export default {
  29. props: {
  30. openModal: { // 弹框显示状态
  31. type: Boolean,
  32. default: false
  33. },
  34. infoData: {
  35. tyoe: Object,
  36. default: ()=>{
  37. return null
  38. }
  39. },
  40. },
  41. data() {
  42. return {
  43. isShow: this.openModal, // 是否打开弹框
  44. list: []
  45. }
  46. },
  47. methods: {
  48. // 确认
  49. handleConfirm(){
  50. this.$emit("ok")
  51. },
  52. // 获取列表数据
  53. getList(){
  54. queryWaitListByShelfSn({shelfSn: this.infoData.shelfSn}).then(res => {
  55. if(res.status == 200){
  56. this.list = res.data||[]
  57. }
  58. })
  59. }
  60. },
  61. watch: {
  62. // 父页面传过来的弹框状态
  63. openModal (newValue, oldValue) {
  64. this.isShow = newValue
  65. },
  66. // 重定义的弹框状态
  67. isShow (newValue, oldValue) {
  68. if (!newValue) {
  69. this.$emit('close')
  70. }else{
  71. this.getList()
  72. }
  73. }
  74. }
  75. }
  76. </script>
  77. <style lang="scss" scoped>
  78. .productModal{
  79. width: 100%;
  80. height: 100%;
  81. .product-head{
  82. font-size: 24rpx;
  83. padding: 20upx 30upx 15upx;
  84. border-bottom: 2rpx solid #eee;
  85. color: #666;
  86. .shelfName{
  87. width: 100%;
  88. height: 48rpx;
  89. text-overflow: ellipsis;
  90. overflow: hidden;
  91. flex-grow: 1;
  92. font-weight: bold;
  93. font-size: 26rpx;
  94. color: #333;
  95. text{
  96. display: block;
  97. height: 30rpx;
  98. width: 6rpx;
  99. background: #0485F6;
  100. margin-right: 10rpx;
  101. border-radius: 10rpx;
  102. }
  103. }
  104. }
  105. .product-con{
  106. width: 78%;
  107. margin: 55% auto 0;
  108. background-color: #fff;
  109. border-radius: 24upx;
  110. .product-main{
  111. padding: 0 30upx 20upx 30upx;
  112. font-size: 24upx;
  113. max-height: 30vh;
  114. overflow: auto;
  115. > view{
  116. border-bottom: 2rpx solid #eee;
  117. padding: 15upx 0;
  118. &:last-child{
  119. border: 0;
  120. }
  121. > view{
  122. justify-content: space-between;
  123. &:first-child{
  124. margin-bottom: 10upx;
  125. .l-no{
  126. text{
  127. background-color: #eee;
  128. padding: 0 10upx;
  129. border-radius: 10upx;
  130. margin-right: 15upx;
  131. }
  132. }
  133. .r-nums{
  134. color: #999;
  135. text{
  136. color:red;
  137. }
  138. font-size: 22upx;
  139. }
  140. }
  141. }
  142. .p-name{
  143. font-size: 24upx;
  144. text-overflow: ellipsis;
  145. overflow: hidden;
  146. white-space: nowrap;
  147. }
  148. }
  149. }
  150. .product-footer{
  151. font-size: 30upx;
  152. display: flex;
  153. justify-content: space-between;
  154. align-items: center;
  155. text-align: center;
  156. border-top: 1upx solid #E5E5E5;
  157. .button-cancel{
  158. color: #999;
  159. border-right: 1upx solid #E5E5E5;
  160. flex-grow: 1;
  161. padding: 20upx 0;
  162. }
  163. .button-confirm{
  164. color: #2A86F4;
  165. flex-grow: 1;
  166. padding: 20upx 0;
  167. }
  168. }
  169. }
  170. }
  171. </style>