detailModal.vue 5.2 KB

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