goodsList.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  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 product-view" v-if="pros.productCategory != 2">规格:{{pros.productUnit ? pros.productUnit : ''}}</view>
  18. <view class="floor-item-act" v-if="pros.ladderPriceFlag == 1">
  19. <text class="tag tag-01" v-if="!pros.heUserId">自营</text>
  20. <text class="tag tag-01" v-else>促销</text>
  21. <text class="tag tag-02" @click.stop="clickPopupShow(pros,2)">活动价</text>
  22. </view>
  23. <view class="product-view">
  24. <view class="view-num red">¥{{pros.price | formatPrice}}</view>
  25. </view>
  26. <view class="product-view">
  27. <view class="view-num right">x {{pros.num}}</view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="goods-pros-m" v-if="item.note">
  33. <view class="m-text">留言:</view>
  34. <view class="m-input">
  35. <view class="text">{{item.note ? item.note : ''}}</view>
  36. </view>
  37. </view>
  38. <view class="goods-pros-b">
  39. <view class="count">共{{item.itemCount}}件商品</view>
  40. <view class="sum">
  41. <view class="sum-money" :class="item.promotionFullReduction == 0 ? 'none' : ''">
  42. 商品总额:<text class="money">¥{{item.totalAmount | formatPrice}}</text>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </template>
  50. <script>
  51. export default{
  52. name:"goods",
  53. props:{
  54. shopOrderData:{
  55. type:Array
  56. },
  57. information:{
  58. type:Object
  59. }
  60. },
  61. data() {
  62. return{
  63. initData:[],
  64. }
  65. },
  66. created(){
  67. this.initData = this.shopOrderData
  68. },
  69. filters:{
  70. formatIncludedTax(value) {
  71. if (value === '1') {
  72. return '不含税 ';
  73. } else if (value === '2') {
  74. return '含税';
  75. } else {
  76. return '';
  77. }
  78. },
  79. },
  80. computed: {
  81. },
  82. methods:{
  83. goShophome(id){
  84. this.$api.navigateTo(`/supplier/pages/user/my-shop?shopId=${id}`)
  85. },
  86. details(pros){
  87. if(pros.validFlag == 9){
  88. return
  89. }else{
  90. console.log(pros)
  91. this.$api.navigateTo(`/pages/goods/product?id=${pros.organizeProductId}`)
  92. }
  93. },
  94. clickPopupShow(pros, type){
  95. if(type === 2){
  96. this.$emit('popupClick', pros)
  97. }
  98. },
  99. PromotionsFormat(promo){//促销活动类型数据处理
  100. if(promo!=null){
  101. if(promo.type == 1 && promo.mode == 1){
  102. return true
  103. }else{
  104. return false
  105. }
  106. }
  107. return false
  108. },
  109. }
  110. }
  111. </script>
  112. <style lang="scss">
  113. .goods-template{
  114. width: 100%;
  115. height: auto;
  116. background: #FFFFFF;
  117. float: left;
  118. margin-top: 24rpx;
  119. .goods-list{
  120. width: 100%;
  121. height: auto;
  122. background: #F7F7F7;
  123. .goods-item{
  124. width: 702rpx;
  125. padding:24rpx;
  126. height: auto;
  127. background: #FFFFFF;
  128. margin-bottom: 24rpx;
  129. &:last-child{
  130. margin-bottom: 0;
  131. }
  132. }
  133. .shoptitle{
  134. width: 100%;
  135. float: left;
  136. height: 56rpx;
  137. line-height: 56rpx;
  138. margin-bottom: 12rpx;
  139. .title-logo{
  140. width: 48rpx;
  141. height: 48rpx;
  142. float: left;
  143. border-radius: 8rpx;
  144. border: 1px solid #e1e1e1;
  145. margin-right: 8rpx;
  146. image{
  147. border-radius: 8rpx;
  148. width: 48rpx;
  149. height: 48rpx;
  150. }
  151. }
  152. .title-text{
  153. width: 400rpx;
  154. overflow: hidden;
  155. text-overflow:ellipsis;
  156. white-space: nowrap;
  157. float: left;
  158. font-size: $font-size-28;
  159. color: $text-color;
  160. text-align: left;
  161. line-height: 56rpx;
  162. font-weight: bold;
  163. .iconfont{
  164. color: #999999;
  165. font-size: 28rpx;
  166. margin-left: 10rpx;
  167. }
  168. .paymenttext{
  169. color: #f9a94b;
  170. font-size: $font-size-22;
  171. margin-left: 20rpx;
  172. }
  173. }
  174. }
  175. .productlist{
  176. width: 100%;
  177. height: auto;
  178. border-bottom: 2rpx solid #e1e1e1;
  179. padding: 10rpx;
  180. box-sizing: border-box;
  181. }
  182. .goods-pros-t{
  183. display: flex;
  184. width: 100%;
  185. height: auto;
  186. margin: 20rpx 0;
  187. .pros-left{
  188. width: 210rpx;
  189. height: 100%;
  190. margin:0 26rpx 0 0;
  191. }
  192. .pros-img{
  193. width: 210rpx;
  194. height: 210rpx;
  195. border-radius: 10rpx;
  196. border:1px solid #f3f3f3;
  197. position: relative;
  198. image{
  199. width: 210rpx;
  200. height: 210rpx;
  201. border-radius: 10rpx;
  202. }
  203. }
  204. }
  205. .pros-product{
  206. width: 468rpx;
  207. height: 100%;
  208. line-height: 36rpx;
  209. font-size: $font-size-26;
  210. position: relative;
  211. .product-view{
  212. &.allPrice{
  213. width: 100%;
  214. }
  215. .view-num{
  216. flex: 1;
  217. text-align: left;
  218. font-size: $font-size-26;
  219. color: #999999;
  220. line-height: 44rpx;
  221. float: left;
  222. &.right{
  223. float: right;
  224. }
  225. &.red{
  226. color: $color-system;
  227. font-weight: bold;
  228. &.disabled{
  229. color: #999999;
  230. text-decoration: line-through;
  231. }
  232. }
  233. }
  234. }
  235. .producttitle{
  236. width: 100%;
  237. display: inline-block;
  238. height: auto;
  239. text-overflow:ellipsis;
  240. display: -webkit-box;
  241. word-break: break-all;
  242. -webkit-box-orient: vertical;
  243. -webkit-line-clamp: 2;
  244. overflow: hidden;
  245. margin-bottom: 8rpx;
  246. }
  247. .productspec{
  248. height: 44rpx;
  249. color: #999999;
  250. line-height: 44rpx;
  251. }
  252. .productprice{
  253. height: 48rpx;
  254. position: absolute;
  255. width: 100%;
  256. bottom: 0;
  257. .price{
  258. line-height: 48rpx;
  259. font-size: $font-size-28;
  260. width: 48%;
  261. color: #ff457b;
  262. float: left;
  263. }
  264. .count{
  265. height: 100%;
  266. float: right;
  267. position: relative;
  268. .small{
  269. color: #666666;
  270. }
  271. }
  272. }
  273. .floor-item-act{
  274. width: 100%;
  275. height: 32rpx;
  276. margin-top: 8rpx;
  277. float: left;
  278. .tag{
  279. display: inline-block;
  280. height: 32rpx;
  281. font-size: 22rpx;
  282. line-height: 30rpx;
  283. text-align: center;
  284. color: #f83c6c;
  285. float: left;
  286. margin-right: 10rpx;
  287. &.tag-02{
  288. width: 80rpx;
  289. background: url(https://static.caimei365.com/app/mini-hehe/icon/icon-active.png)top center no-repeat;
  290. background-size: contain;
  291. }
  292. &.tag-01{
  293. width: 56rpx;
  294. color: #fff;
  295. background-color: #f83c6c;
  296. border-radius: 4rpx;
  297. }
  298. }
  299. }
  300. }
  301. .goods-pros-m{
  302. width: 100%;
  303. height: auto;
  304. line-height: 76rpx;
  305. font-size: $font-size-26;
  306. color: $text-color;
  307. float: left;
  308. .m-text{
  309. width: 62rpx;
  310. float: left;
  311. padding-right: 20rpx;
  312. font-weight:bold;
  313. }
  314. .m-input{
  315. display: -webkit-box;
  316. display: -webkit-flex;
  317. display: flex;
  318. -webkit-box-align: center;
  319. -webkit-align-items: center;
  320. align-items: center;
  321. position: relative;
  322. width: 620rpx;
  323. height: auto;
  324. padding: 20rpx 0 10rpx 0;
  325. background: #FFFFFF;
  326. .text{
  327. width: 100%;
  328. height: 100%;
  329. font-size: $font-size-26;
  330. line-height: 36rpx;
  331. color: #333333;
  332. }
  333. }
  334. }
  335. .goods-pros-b{
  336. width:100%;
  337. height: 80rpx;
  338. margin-top: 12rpx;
  339. float: left;
  340. .count{
  341. float: left;
  342. font-size: $font-size-26;
  343. line-height: 80rpx;
  344. color: $text-color;
  345. display: flex;
  346. justify-content: flex-end;
  347. font-weight: bold;
  348. }
  349. .sum{
  350. width: 520rpx;
  351. float: right;
  352. .sum-money{
  353. width: 100%;
  354. height: 40rpx;
  355. font-size: $font-size-28;
  356. line-height: 40rpx;
  357. color: $text-color;
  358. display: flex;
  359. justify-content: flex-end;
  360. &.none{
  361. height: 80rpx;
  362. line-height: 80rpx;
  363. }
  364. .money{
  365. color: $color-system;
  366. font-size: $font-size-28;
  367. }
  368. }
  369. }
  370. }
  371. }
  372. }
  373. </style>