123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266 |
- <template name="goods">
- <view class="goods-template">
- <!-- 商品列表 -->
- <view class="goods-list">
- <view v-for="(item, index) in shopOrderData" :key="index" class="goods-item clearfix">
- <view class="shoptitle">
- <view class="title-logo"><image :src="item.shopLogo" mode=""></image></view>
- <view class="title-text">{{item.shopName}}</view>
- </view>
- <view class="productlist" v-for="(pros,idx) in item.orderProductList" :key="idx">
- <view class="goods-pros-t">
- <view class="pros-left">
- <view class="pros-img"><image :src="pros.productImage" alt="" /></view>
- </view>
- <view class="pros-product">
- <view class="producttitle">{{pros.name}}</view>
- <view class="productspec">规格:{{pros.productUnit ? pros.productUnit : ''}}</view>
- <view class="product-view">
- <view class="view-num">单价:¥{{pros.price.toFixed(2)}}</view>
- <view class="view-num">数量(赠品):{{pros.num}}({{pros.presentNum}})</view>
- </view>
- <view class="product-view">
- <view class="view-num">税率:{{pros.taxRate}}%</view>
- <view class="view-num">折扣:{{pros.discount == null ? '0' : pros.discount}}%</view>
- </view>
- <view class="product-view">
- <view class="view-num">折后单价:¥{{pros.discountPrice.toFixed(2)}}</view>
- </view>
- <view class="product-view">
- <view class="view-num">合计:¥{{pros.totalFee.toFixed(2)}}</view>
- </view>
- </view>
- </view>
- </view>
- <view class="goods-pros-m" v-if="item.note!=''">
- <view class="m-text">留言:</view>
- <view class="m-input">
- <view class="text">{{item.note ? item.note : ''}}</view>
- </view>
- </view>
- <view class="goods-pros-b">
- <view class="count">共{{item.itemCount}}件商品</view>
- <view class="sum">商品总额:<text class="money">¥{{item.totalAmount.toFixed(2)}}</text></view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default{
- name:"goods",
- props:{
- shopOrderData:{
- type:Array
- }
- },
- data() {
- return{
- initData:[]
- }
- },
- created(){
- this.initData = this.shopOrderData
- },
- computed: {
- },
- methods:{
- }
- }
- </script>
- <style lang="scss">
- .goods-template{
- width: 100%;
- height: auto;
- background: #FFFFFF;
- float: left;
- margin-top: 24rpx;
- .goods-list{
- width: 100%;
- height: auto;
- background: #F7F7F7;
- .goods-item{
- width: 702rpx;
- padding:24rpx;
- height: auto;
- background: #FFFFFF;
- margin-bottom: 24rpx;
- &:last-child{
- margin-bottom: 0;
- }
- }
- .shoptitle{
- width: 100%;
- float: left;
- height: 56rpx;
- line-height: 56rpx;
- margin-bottom: 12rpx;
- .title-logo{
- width: 48rpx;
- height: 48rpx;
- float: left;
- image{
- width: 48rpx;
- height: 48rpx;
- }
- }
- .title-text{
- float: left;
- margin-left: 16rpx;
- font-size: $font-size-28;
- color: $text-color;
- text-align: left;
- line-height: 56rpx;
- font-weight: bold;
- }
- }
- .productlist{
- width: 100%;
- height: auto;
- }
- .goods-pros-t{
- display: flex;
- align-items: center;
- width: 100%;
- height: auto;
- padding: 12rpx 0;
- .pros-left{
- width: 210rpx;
- height: 100%;
- margin:0 26rpx 0 0;
- }
- .pros-img{
- width: 210rpx;
- height: 210rpx;
- border-radius: 10rpx;
- border:1px solid #f3f3f3;
- image{
- width: 100%;
- height: 100%;
- border-radius: 10rpx;
- }
- }
- }
- .pros-product{
- width: 468rpx;
- height: 100%;
- line-height: 36rpx;
- font-size: $font-size-26;
- position: relative;
- .product-view{
- width: 100%;
- height: auto;
- display: flex;
- .view-num{
- flex: 1;
- text-align: left;
- font-size: $font-size-26;
- color: #666666;
- line-height: 44rpx;
- }
- }
- .producttitle{
- width: 100%;
- display: inline-block;
- height: auto;
- text-overflow:ellipsis;
- display: -webkit-box;
- word-break: break-all;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- margin-bottom: 8rpx;
- }
- .productspec{
- height: 44rpx;
- color: #666666;
- line-height: 44rpx;
- }
- .productprice{
- height: 48rpx;
- position: absolute;
- width: 100%;
- bottom: 0;
- .price{
- line-height: 48rpx;
- font-size: $font-size-28;
- width: 48%;
- color: #FF2A2A;
- float: left;
- }
- .count{
- height: 100%;
- float: right;
- position: relative;
- .small{
- color: #666666;
- }
- }
- }
- }
- .goods-pros-m{
- width: 100%;
- height: auto;
- line-height: 76rpx;
- font-size: $font-size-26;
- color: $text-color;
- float: left;
- .m-text{
- width: 62rpx;
- float: left;
- padding-right: 20rpx;
- font-weight:bold;
- }
- .m-input{
- display: -webkit-box;
- display: -webkit-flex;
- display: flex;
- -webkit-box-align: center;
- -webkit-align-items: center;
- align-items: center;
- position: relative;
- width: 620rpx;
- height: auto;
- padding: 20rpx 0 10rpx 0;
- background: #FFFFFF;
- .text{
- width: 100%;
- height: 100%;
- font-size: $font-size-26;
- line-height: 36rpx;
- color: #333333;
- }
- }
- }
- .goods-pros-b{
- width:100%;
- height: 40rpx;
- margin-top: 12rpx;
- float: left;
- .count{
- float: left;
- font-size: $font-size-28;
- line-height: 40rpx;
- color: $text-color;
- display: flex;
- justify-content: flex-end;
- }
- .sum{
- font-size: $font-size-28;
- line-height: 40rpx;
- color: $text-color;
- display: flex;
- justify-content: flex-end;
- .money{
- color: #FF2A2A;
- font-size: $font-size-28;
- }
- }
- }
- }
- }
- </style>
|