goodsList.vue 8.0 KB

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