|
@@ -84,7 +84,7 @@
|
|
|
></u-number-box>
|
|
|
<view class="amount-box">
|
|
|
<text class="amount-symbol">¥</text>
|
|
|
- <text class="amount-number">{{ (item.productPrice * item.productQuantity).toFixed(2) }}</text>
|
|
|
+ <text class="amount-number">{{ itemAmount(item) }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -205,6 +205,11 @@ export default {
|
|
|
selectItem(index) {
|
|
|
this.selectedIndex = index;
|
|
|
},
|
|
|
+ itemAmount(row) {
|
|
|
+ let amount = (row.productPrice * row.productQuantity).toFixed(2)
|
|
|
+ row.productAmount = amount
|
|
|
+ return amount
|
|
|
+ },
|
|
|
async fetchData(reset = false) {
|
|
|
if (this.loading) return;
|
|
|
|
|
@@ -350,7 +355,7 @@ export default {
|
|
|
uni.navigateBack({
|
|
|
delta: 1
|
|
|
});
|
|
|
- }, 1000)
|
|
|
+ }, 500)
|
|
|
},
|
|
|
handleUpdate() {
|
|
|
uni.showLoading({title: '提交中...'});
|
|
@@ -394,7 +399,8 @@ export default {
|
|
|
this.goodsList.push( {
|
|
|
productName: res.data[num].dictValue,
|
|
|
productPrice: res.data[num].dictKey,
|
|
|
- productQuantity: 0
|
|
|
+ productQuantity: 0,
|
|
|
+ productAmount: 0
|
|
|
})
|
|
|
}
|
|
|
this.orderDetail()
|