goodsList.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. <template name="goods">
  2. <view class="goods-template">
  3. <!-- 商品列表 -->
  4. <view class="goods-list">
  5. <view v-for="(item, index) in shopOrderData" :key="index" class="goods-item clearfix">
  6. <view class="shoptitle">
  7. <view class="title-logo"><image :src="item.shopLogo" mode=""></image></view>
  8. <view class="title-text">{{item.shopName}}</view>
  9. </view>
  10. <view class="productlist" v-for="(pros,idx) in item.cmOrderProducts" :key="idx">
  11. <view class="goods-pros-t">
  12. <view class="pros-img"><image :src="pros.productImage" alt="" /></view>
  13. <view class="pros-product">
  14. <view class="producttitle">{{pros.name}}</view>
  15. <view class="productspec">规格:{{pros.productUnit}}</view>
  16. <view class="productprice">
  17. <view class="price">
  18. <text>¥{{pros.price.toFixed(2)}}</text>
  19. </view>
  20. <view class="count">
  21. <text class="small">x</text>{{pros.num}}
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="goods-pros-m" v-if="item.note!=''">
  28. <view class="m-text">留言:</view>
  29. <view class="m-input">
  30. <view class="text">{{item.note}}</view>
  31. </view>
  32. </view>
  33. <view class="goods-pros-b">
  34. <view class="count">共{{item.itemCount}}件商品</view>
  35. <view class="sum">合计:<text class="money">¥{{item.productAmount.toFixed(2)}}</text></view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. export default{
  43. name:"goods",
  44. props:{
  45. shopOrderData:{
  46. type:Array
  47. }
  48. },
  49. data() {
  50. return{
  51. initData:[]
  52. }
  53. },
  54. created(){
  55. this.initData = this.shopOrderData
  56. },
  57. computed: {
  58. },
  59. methods:{
  60. }
  61. }
  62. </script>
  63. <style lang="scss">
  64. .goods-template{
  65. width: 100%;
  66. height: auto;
  67. background: #FFFFFF;
  68. float: left;
  69. margin-top: 24rpx;
  70. .goods-list{
  71. width: 100%;
  72. height: auto;
  73. background: #F7F7F7;
  74. .goods-item{
  75. width: 702rpx;
  76. padding:24rpx;
  77. height: auto;
  78. background: #FFFFFF;
  79. margin-bottom: 24rpx;
  80. &:last-child{
  81. margin-bottom: 0;
  82. }
  83. }
  84. .shoptitle{
  85. width: 100%;
  86. float: left;
  87. height: 56rpx;
  88. line-height: 56rpx;
  89. margin-bottom: 12rpx;
  90. .title-logo{
  91. width: 48rpx;
  92. height: 48rpx;
  93. float: left;
  94. image{
  95. width: 48rpx;
  96. height: 48rpx;
  97. }
  98. }
  99. .title-text{
  100. float: left;
  101. margin-left: 16rpx;
  102. font-size: $font-size-base;
  103. color: $text-color;
  104. text-align: left;
  105. line-height: 56rpx;
  106. font-weight: bold;
  107. }
  108. }
  109. .productlist{
  110. width: 100%;
  111. height: auto;
  112. }
  113. .goods-pros-t{
  114. display: flex;
  115. align-items: center;
  116. width: 100%;
  117. height: 217rpx;
  118. padding: 12rpx 0;
  119. .pros-img{
  120. width: 210rpx;
  121. height: 100%;
  122. border-radius: 10rpx;
  123. margin:0 26rpx 0 0;
  124. border:1px solid #f3f3f3;
  125. image{
  126. width: 100%;
  127. height: 100%;
  128. border-radius: 10rpx;
  129. }
  130. }
  131. }
  132. .pros-product{
  133. width: 468rpx;
  134. height: 100%;
  135. line-height: 36rpx;
  136. font-size: $font-size-sb;
  137. position: relative;
  138. .producttitle{
  139. width: 100%;
  140. display: inline-block;
  141. height: auto;
  142. text-overflow:ellipsis;
  143. display: -webkit-box;
  144. word-break: break-all;
  145. -webkit-box-orient: vertical;
  146. -webkit-line-clamp: 2;
  147. overflow: hidden;
  148. margin-bottom: 8rpx;
  149. }
  150. .productspec{
  151. height: 36rpx;
  152. color: #999999;
  153. }
  154. .productprice{
  155. height: 48rpx;
  156. position: absolute;
  157. width: 100%;
  158. bottom: 0;
  159. .price{
  160. line-height: 48rpx;
  161. font-size: $font-size-base;
  162. width: 48%;
  163. color: #FF2A2A;
  164. float: left;
  165. }
  166. .count{
  167. height: 100%;
  168. float: right;
  169. position: relative;
  170. .small{
  171. color: #666666;
  172. }
  173. }
  174. }
  175. }
  176. .goods-pros-m{
  177. width: 100%;
  178. height: auto;
  179. line-height: 76rpx;
  180. font-size: $font-size-sb;
  181. color: $text-color;
  182. float: left;
  183. .m-text{
  184. width: 62rpx;
  185. float: left;
  186. padding-right: 20rpx;
  187. font-weight:bold;
  188. }
  189. .m-input{
  190. display: -webkit-box;
  191. display: -webkit-flex;
  192. display: flex;
  193. -webkit-box-align: center;
  194. -webkit-align-items: center;
  195. align-items: center;
  196. position: relative;
  197. width: 620rpx;
  198. height: auto;
  199. padding: 20rpx 0 10rpx 0;
  200. background: #FFFFFF;
  201. .text{
  202. width: 100%;
  203. height: 100%;
  204. font-size: $font-size-sb;
  205. line-height: 36rpx;
  206. color: #333333;
  207. }
  208. }
  209. }
  210. .goods-pros-b{
  211. width:100%;
  212. height: 40rpx;
  213. margin-top: 12rpx;
  214. float: left;
  215. .count{
  216. float: left;
  217. font-size: $font-size-base;
  218. line-height: 40rpx;
  219. color: $text-color;
  220. display: flex;
  221. justify-content: flex-end;
  222. }
  223. .sum{
  224. font-size: $font-size-base;
  225. line-height: 40rpx;
  226. color: $text-color;
  227. display: flex;
  228. justify-content: flex-end;
  229. .money{
  230. color: #FF2A2A;
  231. font-size: $font-size-base;
  232. }
  233. }
  234. }
  235. }
  236. }
  237. </style>