goodsList.vue 5.8 KB

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