freezeQtyModal.vue 3.8 KB

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