detailModal.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  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" @minus="minus" @plus="plus" @change="change"></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. minus(){
  91. this.$emit("changeNumRecount")
  92. },
  93. plus(){
  94. this.$emit("changeNumRecount")
  95. },
  96. change(){
  97. this.$emit("changeNumRecount")
  98. }
  99. },
  100. watch: {
  101. // 父页面传过来的弹框状态
  102. detailShow (newValue, oldValue) {
  103. this.isShow = newValue
  104. },
  105. // 重定义的弹框状态
  106. isShow (newValue, oldValue) {
  107. if (!newValue) {
  108. this.$emit('close')
  109. }else{
  110. this.list = this.chooseData
  111. }
  112. }
  113. }
  114. }
  115. </script>
  116. <style lang="less" scoped>
  117. .head{
  118. width: 100%;
  119. box-sizing: border-box;
  120. padding:30rpx 20rpx;
  121. background: #e0e0e0;
  122. text{
  123. &:first-child{
  124. font-weight: bold;
  125. }
  126. }
  127. }
  128. .scroll-view{
  129. height: 702rpx;
  130. }
  131. .partList-list-box {
  132. padding: 20rpx;
  133. border-bottom: 2rpx solid #f5f5f5;
  134. &:last-child {
  135. border: 0;
  136. }
  137. .product {
  138. flex-grow: 1;
  139. .checkbox {
  140. width: 60rpx;
  141. }
  142. .checkboxRight{
  143. width: calc(100% - 60rpx);
  144. }
  145. .pinfo {
  146. width: calc(100% - 148rpx);
  147. flex-grow: 1;
  148. padding-left: 20rpx;
  149. .pname {
  150. font-size: 32rpx;
  151. color: #191919;
  152. margin-bottom: 10rpx;
  153. text {
  154. font-weight: normal;
  155. margin-right: 6rpx;
  156. padding: 0 10rpx;
  157. background: rgba(3, 54, 146, 0.15);
  158. border-radius: 100rpx;
  159. color: #033692;
  160. font-size: 28rpx;
  161. }
  162. }
  163. .productName{
  164. width: 100%;
  165. font-size: 32rpx;
  166. color: #191919;
  167. font-weight: bold;
  168. margin:10rpx 0;
  169. }
  170. .pno {
  171. background-color: rgba(3, 54, 146, 0.15);
  172. border-radius: 50rpx;
  173. padding: 0 20rpx;
  174. color: #033692;
  175. font-size: 24rpx;
  176. margin-right: 10rpx;
  177. }
  178. .ptxt {
  179. font-size: 24rpx;
  180. color: #999;
  181. .pnums {
  182. color: #222;
  183. padding: 0 4upx;
  184. }
  185. }
  186. }
  187. }
  188. .ptools {
  189. margin-top: 30rpx;
  190. margin-left: 60rpx;
  191. .ptools_l{
  192. font-size: 24rpx;
  193. color: #999;
  194. .pnums {
  195. color: #ff5500;
  196. padding: 0 4rpx;
  197. }
  198. }
  199. .pcurnums {
  200. > text {
  201. font-size: 24rpx;
  202. color: #999;
  203. margin-right: 20rpx;
  204. }
  205. }
  206. .u-ninput {
  207. border: 2rpx solid #eee;
  208. border-radius: 50rpx;
  209. padding: 0 6rpx;
  210. }
  211. /deep/ .u-icon-disabled {
  212. background: #fff !important;
  213. }
  214. /deep/ .u-number-input {
  215. margin: 0 0;
  216. border: 2rpx solid #eee;
  217. border-top: 0;
  218. border-bottom: 0;
  219. }
  220. /deep/ .u-icon-plus,
  221. /deep/ .u-icon-minus {
  222. border-radius: 50rpx;
  223. }
  224. }
  225. }
  226. </style>