Browse Source

下单加数量

feature/3.1.0-小区合伙人
lfs3 6 years ago
parent
commit
288b195656
1 changed files with 40 additions and 24 deletions
  1. 64
      src/view/order-check.vue

64
src/view/order-check.vue

@ -14,10 +14,17 @@
<div class="goods-container"> <div class="goods-container">
<img :src="imghost+info.goodsImgUrl"> <img :src="imghost+info.goodsImgUrl">
<div class="goods-main-container"> <div class="goods-main-container">
<div class="name">{{info.goodsName}}</div>
<div class="title-box">
<div class="name">{{info.goodsName}}</div>
<div class="name">¥{{info.totalPrice?info.totalPrice/100:''}}</div>
</div>
<div class="box"> <div class="box">
<div class="box-text">{{info.shortDesc}}</div> <div class="box-text">{{info.shortDesc}}</div>
<div class="box-price">¥{{info.totalPrice?info.totalPrice/100:''}}</div>
<div class="box-num">
<el-input-number v-model="num" :min="1" :max="10"></el-input-number>
</div>
<!-- <div class="box-price">¥{{info.totalPrice?info.totalPrice/100:''}}</div> -->
</div> </div>
<div class="tag-box"> <div class="tag-box">
<i class="tag" v-for="item in labelList" v-if="item.labelText">{{item.labelText}}</i> <i class="tag" v-for="item in labelList" v-if="item.labelText">{{item.labelText}}</i>
@ -93,6 +100,7 @@
<script> <script>
import backHeader from "../components/back-header.vue"; import backHeader from "../components/back-header.vue";
import orderApi from "../models/order-model.js"; import orderApi from "../models/order-model.js";
import { InlineXNumber } from "vux";
var qs = require("qs"); var qs = require("qs");
import Qs from "qs"; import Qs from "qs";
export default { export default {
@ -102,17 +110,19 @@ export default {
text: "" text: ""
}, },
agree: false, agree: false,
goodsNo: ""
goodsNo: "",
num: 1
}; };
}, },
components: { components: {
"back-header": backHeader
"back-header": backHeader,
InlineXNumber
}, },
computed: { computed: {
price() { price() {
let price = this.info.payPrice; let price = this.info.payPrice;
let discount = this.info.primeCoupon ? this.info.primeCoupon.amount : 0; let discount = this.info.primeCoupon ? this.info.primeCoupon.amount : 0;
return price / 100 - discount / 100;
return price*this.num / 100 - discount / 100;
}, },
labelList() { labelList() {
let str = this.info.smallLabel; let str = this.info.smallLabel;
@ -240,6 +250,7 @@ export default {
goodsNo: goodsNo, goodsNo: goodsNo,
couponNo: couponNo, couponNo: couponNo,
goodsVersion: goodsVersion, goodsVersion: goodsVersion,
goodsNum:this.num,
salesmanUniqueIdentity: this.$cookies.get("1hjz_mall_unique_id"), salesmanUniqueIdentity: this.$cookies.get("1hjz_mall_unique_id"),
housingEstateId: estateId, housingEstateId: estateId,
remark: this.info.text remark: this.info.text
@ -295,6 +306,9 @@ export default {
.top { .top {
margin-bottom: 0.18rem; margin-bottom: 0.18rem;
} }
.el-input-number {
width: 120px;
}
.item-top { .item-top {
height: 0.65rem; height: 0.65rem;
width: 100%; width: 100%;
@ -340,11 +354,10 @@ export default {
.goods-container { .goods-container {
width: 100%; width: 100%;
color: #333; color: #333;
height: 1.6rem;
background-color: white; background-color: white;
display: flex; display: flex;
box-sizing: border-box; box-sizing: border-box;
padding: 0.16rem 0.37rem 0rem 0.22rem;
padding: 0.16rem 0.37rem 0.22rem 0.22rem;
img { img {
width: 1.28rem; width: 1.28rem;
height: 1.28rem; height: 1.28rem;
@ -355,20 +368,26 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding-top: 0.06rem; padding-top: 0.06rem;
.name {
line-height: 1.2;
font-size: 0.3rem;
text-overflow: ellipsis;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
word-wrap: break-word;
// margin-top: 0.1rem;
white-space: normal;
word-break: break-all;
margin-bottom: 0.15rem;
.title-box {
display: flex;
justify-content: space-between;
align-items: flex-end;
.name {
line-height: 1.2;
font-size: 0.3rem;
text-overflow: ellipsis;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
word-wrap: break-word;
// margin-top: 0.1rem;
white-space: normal;
word-break: break-all;
margin-bottom: 0.15rem;
}
} }
.box { .box {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -376,20 +395,17 @@ export default {
margin-bottom: 0.15rem; margin-bottom: 0.15rem;
.box-text { .box-text {
font-size: 0.24rem; font-size: 0.24rem;
line-height: 1.1;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 1;
word-wrap: break-word; word-wrap: break-word;
white-space: normal; white-space: normal;
word-break: break-all; word-break: break-all;
color: #999; color: #999;
height: 0.24rem;
margin-right: 0.2rem; margin-right: 0.2rem;
} }
.box-price {
.box-num {
line-height: 1; line-height: 1;
font-weight: 400; font-weight: 400;
font-size: 0.38rem; font-size: 0.38rem;

Loading…
Cancel
Save