|
|
@ -4,8 +4,13 @@ |
|
|
|
|
|
|
|
|
|
|
|
<view class="tabs"> |
|
|
|
<uv-tabs :list="tabs" :activeStyle="{color : '#FD5100', fontWeight : 600}" lineColor="#FD5100" lineHeight="8rpx" |
|
|
|
lineWidth="50rpx" :scrollable="false" @click="clickTabs"></uv-tabs> |
|
|
|
<uv-tabs :list="tabs" |
|
|
|
:activeStyle="{color : '#FD5100', fontWeight : 600}" |
|
|
|
lineColor="#FD5100" lineHeight="8rpx" |
|
|
|
lineWidth="50rpx" |
|
|
|
:current="current" |
|
|
|
:scrollable="false" |
|
|
|
@click="clickTabs"></uv-tabs> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 选择租赁物品 --> |
|
|
@ -28,8 +33,8 @@ |
|
|
|
|
|
|
|
<view class="info"> |
|
|
|
<view class="title"> |
|
|
|
<view>{{ item.goodsName }}</view> |
|
|
|
<view> |
|
|
|
<view class="text-ellipsis">{{ item.goodsName }}</view> |
|
|
|
<view style="flex-shrink: 0;"> |
|
|
|
数量:{{ item.num }} |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -48,7 +53,12 @@ |
|
|
|
</view> |
|
|
|
<view class="" v-if="item.washPrice"> |
|
|
|
水洗费¥ |
|
|
|
<text>{{ item.washPrice }}</text> |
|
|
|
<text> |
|
|
|
{{ |
|
|
|
((item.washUnitPrice || 0) * item.selectNum) |
|
|
|
.toFixed(2) |
|
|
|
}} |
|
|
|
</text> |
|
|
|
元 |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -83,7 +93,8 @@ |
|
|
|
</view> |
|
|
|
<view class="text"> |
|
|
|
<!-- 共{{ checkboxValue.length }}件,已享受更低优惠 --> |
|
|
|
含租金{{zujin}}¥,水洗费{{washPrice}}¥ |
|
|
|
含租金{{ zujin && zujin.toFixed(2) }}¥, |
|
|
|
水洗费{{ washPrice && washPrice.toFixed(2) }}¥ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="btn2" @click="goCleaning">结算</view> |
|
|
@ -112,7 +123,7 @@ |
|
|
|
data() { |
|
|
|
return { |
|
|
|
checkboxValue : [], |
|
|
|
statusText : ['正常', '换货中', '退货中'], |
|
|
|
// statusText : ['正常', '换货中', '退货中'], |
|
|
|
tabs: [{ |
|
|
|
name: '选择租赁物品' |
|
|
|
}, |
|
|
@ -120,13 +131,17 @@ |
|
|
|
name: '选择我的物品' |
|
|
|
}, |
|
|
|
], |
|
|
|
type: 1, |
|
|
|
current : 0,//当前选中的标签页 |
|
|
|
mixinsListApi : 'getLeasePage', |
|
|
|
} |
|
|
|
}, |
|
|
|
computed : { |
|
|
|
price(){ |
|
|
|
return this.washPrice + this.zujin |
|
|
|
let price = parseFloat(this.washPrice) + parseFloat(this.zujin) |
|
|
|
if(price){ |
|
|
|
return (this.washPrice + this.zujin).toFixed(2) |
|
|
|
} |
|
|
|
return 0 |
|
|
|
}, |
|
|
|
washPrice(){ |
|
|
|
if(this.checkboxValue.length == 0){ |
|
|
@ -137,7 +152,7 @@ |
|
|
|
|
|
|
|
this.list.forEach(n => { |
|
|
|
if(this.checkboxValue.includes(n.id)){ |
|
|
|
price += n.washPrice || 0 |
|
|
|
price += (n.washUnitPrice || 0) * n.selectNum |
|
|
|
} |
|
|
|
}) |
|
|
|
return price |
|
|
@ -146,6 +161,9 @@ |
|
|
|
// if(this.checkboxValue.length == 0){ |
|
|
|
// return 0 |
|
|
|
// } |
|
|
|
if(this.list.length == 0){ |
|
|
|
return 0 |
|
|
|
} |
|
|
|
|
|
|
|
let price = 0 |
|
|
|
|
|
|
@ -157,6 +175,12 @@ |
|
|
|
return price |
|
|
|
}, |
|
|
|
}, |
|
|
|
onLoad(args) { |
|
|
|
if(args.id){ |
|
|
|
// this.checkboxValue = [args.id] |
|
|
|
this.current = 1 |
|
|
|
} |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
this.getData() |
|
|
|
}, |
|
|
@ -166,7 +190,7 @@ |
|
|
|
index, |
|
|
|
name |
|
|
|
}) { |
|
|
|
this.type = index ? 0 : 1; |
|
|
|
this.current = index |
|
|
|
this.queryParams.pageSize = 10 |
|
|
|
this.checkboxValue = [] |
|
|
|
// this.mixinsListApi = ['orderPage', 'orderPage'][index] |
|
|
@ -176,7 +200,7 @@ |
|
|
|
beforeGetData(){ |
|
|
|
let data = {} |
|
|
|
|
|
|
|
data.leaseFlag = this.type |
|
|
|
data.leaseFlag = this.current ? 0 : 1; |
|
|
|
|
|
|
|
return data |
|
|
|
}, |
|
|
@ -213,6 +237,7 @@ |
|
|
|
leaseId: records[i].id, //租赁id |
|
|
|
addressId, //地址id |
|
|
|
type : 1, |
|
|
|
num : records[i].selectNum |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
@ -318,6 +343,7 @@ |
|
|
|
display: flex; |
|
|
|
justify-content: center; |
|
|
|
align-items: center; |
|
|
|
flex-shrink: 0; |
|
|
|
} |
|
|
|
|
|
|
|
.image { |
|
|
@ -333,6 +359,12 @@ |
|
|
|
display: flex; |
|
|
|
padding: 6rpx 20rpx; |
|
|
|
justify-content: space-between; |
|
|
|
.text-ellipsis{ |
|
|
|
width: 280rpx; |
|
|
|
overflow: hidden; //超出的文本隐藏 |
|
|
|
text-overflow: ellipsis; //溢出用省略号显示 |
|
|
|
white-space: nowrap; //溢出不换行 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.unit { |
|
|
|