freezeQtyModal.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <template>
  2. <u-mask class="productModal" :show="isShow" :mask-click-able="false">
  3. <view class="product-con" v-if="infoData">
  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. this.isShow = false
  52. },
  53. // 获取列表数据
  54. getList(){
  55. queryWaitListByShelfSn({shelfSn: this.infoData.shelfSn}).then(res => {
  56. if(res.status == 200){
  57. this.list = res.data||[]
  58. }
  59. })
  60. }
  61. },
  62. watch: {
  63. // 父页面传过来的弹框状态
  64. openModal (newValue, oldValue) {
  65. this.isShow = newValue
  66. },
  67. // 重定义的弹框状态
  68. isShow (newValue, oldValue) {
  69. if (!newValue) {
  70. this.$emit('close')
  71. }else{
  72. this.getList()
  73. }
  74. }
  75. }
  76. }
  77. </script>
  78. <style lang="scss" scoped>
  79. .productModal{
  80. width: 100%;
  81. height: 100%;
  82. .product-head{
  83. font-size: 26rpx;
  84. padding: 20upx 30upx 15upx;
  85. border-bottom: 2rpx solid #eee;
  86. color: #666;
  87. .shelfName{
  88. width: 100%;
  89. height: 48rpx;
  90. text-overflow: ellipsis;
  91. overflow: hidden;
  92. flex-grow: 1;
  93. font-weight: bold;
  94. font-size: 26rpx;
  95. color: #333;
  96. text{
  97. display: block;
  98. height: 30rpx;
  99. width: 6rpx;
  100. background: #0485F6;
  101. margin-right: 10rpx;
  102. border-radius: 10rpx;
  103. }
  104. }
  105. }
  106. .product-con{
  107. width: 78%;
  108. margin: 55% auto 0;
  109. background-color: #fff;
  110. border-radius: 24upx;
  111. .product-main{
  112. padding: 0 30upx 20upx 30upx;
  113. font-size: 24upx;
  114. max-height: 30vh;
  115. overflow: auto;
  116. > view{
  117. border-bottom: 2rpx solid #eee;
  118. padding: 15upx 0;
  119. &:last-child{
  120. border: 0;
  121. }
  122. > view{
  123. justify-content: space-between;
  124. &:first-child{
  125. margin-bottom: 10upx;
  126. .l-no{
  127. text{
  128. background-color: #eee;
  129. padding: 0 10upx;
  130. border-radius: 10upx;
  131. margin-right: 15upx;
  132. }
  133. }
  134. .r-nums{
  135. color: #999;
  136. text{
  137. color:red;
  138. }
  139. font-size: 22upx;
  140. }
  141. }
  142. }
  143. .p-name{
  144. font-size: 24upx;
  145. text-overflow: ellipsis;
  146. overflow: hidden;
  147. white-space: nowrap;
  148. }
  149. }
  150. }
  151. .product-footer{
  152. font-size: 30upx;
  153. display: flex;
  154. justify-content: space-between;
  155. align-items: center;
  156. text-align: center;
  157. border-top: 1upx solid #E5E5E5;
  158. .button-cancel{
  159. color: #999;
  160. border-right: 1upx solid #E5E5E5;
  161. flex-grow: 1;
  162. padding: 20upx 0;
  163. }
  164. .button-confirm{
  165. color: #2A86F4;
  166. flex-grow: 1;
  167. padding: 20upx 0;
  168. }
  169. }
  170. }
  171. }
  172. </style>