scaned-pop.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <template>
  2. <view>
  3. <u-popup :show="scanedShow" :closeOnClickOverlay="false" @close="closeClick" mode="center" :round="10">
  4. <view class="error-box">
  5. <view class="flex_box flex_row_center">
  6. <u-image src="@/static/image/error-img.png" width="112rpx" height="112rpx"></u-image>
  7. </view>
  8. <view class="tips-value">请确认该商品出库数量</view>
  9. <view class="num-box">
  10. <u-number-box v-model="numberVal">
  11. <view slot="minus" class="minus">
  12. <u-icon name="minus" color="#0256FF" size="12"></u-icon>
  13. </view>
  14. <text slot="input" class="input">{{numberVal}}</text>
  15. <view slot="plus" class="plus">
  16. <u-icon name="plus" color="#FFFFFF" size="12"></u-icon>
  17. </view>
  18. </u-number-box>
  19. </view>
  20. </good-item>
  21. <view class="btn-box">
  22. <u-button class="no-btn" type="primary" :plain="true" text="取消" @click="closeClick"></u-button>
  23. <u-button class="yes-btn" type="primary" text="确认" @click="confirmClick"></u-button>
  24. </view>
  25. </view>
  26. </u-popup>
  27. </view>
  28. </template>
  29. <script>
  30. export default{
  31. props:{
  32. value:{
  33. type:Boolean,
  34. default:false
  35. },
  36. scanNum:{
  37. type:[Number,String],
  38. default:1
  39. }
  40. },
  41. watch:{
  42. value: {
  43. handler(val) {
  44. this.scanedShow = val
  45. },
  46. immediate:true
  47. },
  48. scanNum: {
  49. handler(val) {
  50. console.log(val,'val')
  51. this.numberVal = val
  52. },
  53. immediate:true
  54. },
  55. },
  56. data() {
  57. return {
  58. scanedShow:false,
  59. numberVal:0
  60. }
  61. },
  62. methods:{
  63. closeClick() {
  64. this.$emit('close')
  65. },
  66. confirmClick() {
  67. this.$emit('confirm',this.numberVal)
  68. }
  69. }
  70. }
  71. </script>
  72. <style lang="scss" scoped>
  73. .error-box {
  74. width: 580rpx;
  75. padding: 48rpx 36rpx 48rpx;
  76. .tips-value {
  77. color: #1D212A;
  78. font-family: "PingFang SC";
  79. font-size: 32rpx;
  80. font-style: normal;
  81. font-weight: bold;
  82. margin-top: 30rpx;
  83. text-align: center;
  84. }
  85. .btn-box {
  86. display: flex;
  87. justify-content: space-between;
  88. margin-top: 40rpx;
  89. .no-btn {
  90. width: 244rpx;
  91. border-radius: 16rpx;
  92. border: 1px solid #BFC8DB;
  93. color: #86909C;
  94. font-size: 32rpx;
  95. }
  96. .yes-btn {
  97. width: 244rpx;
  98. border-radius: 16rpx;
  99. background: #0256FF;
  100. font-size: 32rpx;
  101. }
  102. }
  103. .num-box {
  104. display: flex;
  105. align-items: center;
  106. justify-content: center;
  107. margin-top: 30rpx;
  108. .input {
  109. width: 112rpx;
  110. text-align: center;
  111. border-bottom: 1px solid #0256FF;
  112. margin: 0 8rpx;
  113. }
  114. .minus {
  115. width: 40rpx;
  116. height: 40rpx;
  117. border-radius: 8rpx;
  118. border: 1px solid #0256FF;
  119. display: flex;
  120. align-items: center;
  121. justify-content: center;
  122. }
  123. .plus {
  124. width: 40rpx;
  125. height: 40rpx;
  126. border-radius: 8rpx;
  127. background-color: #0256FF;
  128. display: flex;
  129. align-items: center;
  130. justify-content: center;
  131. }
  132. }
  133. }
  134. </style>