detailModal.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <template>
  2. <u-popup v-model="isShow" mode="bottom" height="800" border-radius="25">
  3. <view class="head u-flex u-row-between">
  4. <text>已选产品</text>
  5. <text @click="clearAllList">清空列表</text>
  6. </view>
  7. <scroll-view scroll-y class="scroll-view" v-if="list.length>0">
  8. <view class="partList-list-box" v-for="(con,i) in list" :key="con.id">
  9. <view class="product flex align_center">
  10. <view class="checkbox" @click="clearList(con.id,i)">
  11. <u-icon name="close-circle" color="#999" size="40"></u-icon>
  12. </view>
  13. <view class="checkboxRight flex align_center flex_1">
  14. <view class="pimgs">
  15. <u-image src="`../../static/${$config('themePath')}/def_img@2x.png`" width="128" height="128" border-radius="10"></u-image>
  16. </view>
  17. <view class="pinfo">
  18. <view class="pname">
  19. <text>{{con.shelfPlaceCode}}</text>
  20. {{con.productCode}}
  21. </view>
  22. <view class="productName u-line-1">
  23. {{con.productName}}
  24. </view>
  25. <view class="ptxt flex align_center">
  26. <view>
  27. 最大库容
  28. <text class="pnums">{{con.maxQty}}</text>
  29. </view>
  30. <view>
  31. /货架库存
  32. <text class="pnums">{{con.qty}}</text>
  33. </view>
  34. <view>
  35. /滞销
  36. <text class="pnums">{{con.unsalableDays}}</text>
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. <view class="ptools flex align_center justify_between">
  43. <view class="ptools_l u-flex">
  44. <view v-if="con.replenishBillQty && con.replenishBillQty!=0">
  45. 补货在途
  46. <text class="pnums">{{con.replenishBillQty}}</text>
  47. </view>
  48. <view v-if="con.recallBillQty && con.recallBillQty!=0">
  49. 调回在途
  50. <text class="pnums">{{con.recallBillQty}}</text>
  51. </view>
  52. </view>
  53. <view class="pcurnums flex align_center">
  54. <text>调回数量</text>
  55. <view class="u-ninput"><u-number-box color="#000" :input-height="60" bg-color="#fff" v-model="con.confirmQty" :min="0" :max="10"></u-number-box></view>
  56. </view>
  57. </view>
  58. </view>
  59. </scroll-view>
  60. <u-empty :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="200" text="暂无选中回调单" img-width="120" v-else></u-empty>
  61. </u-popup>
  62. </template>
  63. <script>
  64. export default {
  65. props: {
  66. detailShow: { // 弹框显示状态
  67. type: Boolean,
  68. default: false
  69. },
  70. chooseData:{
  71. type: Array,
  72. default:()=>[]
  73. }
  74. },
  75. data() {
  76. return {
  77. isShow:this.detailShow,
  78. list:this.chooseData
  79. }
  80. },
  81. methods: {
  82. clearList(id,i){
  83. this.chooseData.splice(i,1);
  84. this.$emit("clearList",id)
  85. },
  86. clearAllList(){
  87. this.list = [];
  88. this.$emit("clearAllList")
  89. }
  90. },
  91. watch: {
  92. // 父页面传过来的弹框状态
  93. detailShow (newValue, oldValue) {
  94. this.isShow = newValue
  95. },
  96. // 重定义的弹框状态
  97. isShow (newValue, oldValue) {
  98. if (!newValue) {
  99. this.$emit('close')
  100. }else{
  101. this.list = this.chooseData
  102. }
  103. }
  104. }
  105. }
  106. </script>
  107. <style lang="less" scoped>
  108. .head{
  109. width: 100%;
  110. box-sizing: border-box;
  111. padding:30rpx 20rpx;
  112. background: #e0e0e0;
  113. text{
  114. &:first-child{
  115. font-weight: bold;
  116. }
  117. }
  118. }
  119. .scroll-view{
  120. height: 702rpx;
  121. }
  122. .partList-list-box {
  123. padding: 20rpx;
  124. border-bottom: 2rpx solid #f5f5f5;
  125. &:last-child {
  126. border: 0;
  127. }
  128. .product {
  129. flex-grow: 1;
  130. .checkbox {
  131. width: 60rpx;
  132. }
  133. .checkboxRight{
  134. width: calc(100% - 60rpx);
  135. }
  136. .pinfo {
  137. width: calc(100% - 148rpx);
  138. flex-grow: 1;
  139. padding-left: 20rpx;
  140. .pname {
  141. font-size: 32rpx;
  142. color: #191919;
  143. margin-bottom: 10rpx;
  144. text {
  145. font-weight: normal;
  146. margin-right: 6rpx;
  147. padding: 0 10rpx;
  148. background: rgba(3, 54, 146, 0.15);
  149. border-radius: 100rpx;
  150. color: #033692;
  151. font-size: 28rpx;
  152. }
  153. }
  154. .productName{
  155. width: 100%;
  156. font-size: 32rpx;
  157. color: #191919;
  158. font-weight: bold;
  159. margin:10rpx 0;
  160. }
  161. .pno {
  162. background-color: rgba(3, 54, 146, 0.15);
  163. border-radius: 50rpx;
  164. padding: 0 20rpx;
  165. color: #033692;
  166. font-size: 24rpx;
  167. margin-right: 10rpx;
  168. }
  169. .ptxt {
  170. font-size: 24rpx;
  171. color: #999;
  172. .pnums {
  173. color: #222;
  174. padding: 0 4upx;
  175. }
  176. }
  177. }
  178. }
  179. .ptools {
  180. margin-top: 30rpx;
  181. margin-left: 60rpx;
  182. .ptools_l{
  183. font-size: 24rpx;
  184. color: #999;
  185. .pnums {
  186. color: #ff5500;
  187. padding: 0 4rpx;
  188. }
  189. }
  190. .pcurnums {
  191. > text {
  192. font-size: 24rpx;
  193. color: #999;
  194. margin-right: 20rpx;
  195. }
  196. }
  197. .u-ninput {
  198. border: 2rpx solid #eee;
  199. border-radius: 50rpx;
  200. padding: 0 6rpx;
  201. }
  202. /deep/ .u-icon-disabled {
  203. background: #fff !important;
  204. }
  205. /deep/ .u-number-input {
  206. margin: 0 0;
  207. border: 2rpx solid #eee;
  208. border-top: 0;
  209. border-bottom: 0;
  210. }
  211. /deep/ .u-icon-plus,
  212. /deep/ .u-icon-minus {
  213. border-radius: 50rpx;
  214. }
  215. }
  216. }
  217. </style>