goodsList.vue 6.1 KB

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