|
@@ -12,7 +12,7 @@
|
|
|
border
|
|
|
style="width: 100%">
|
|
|
<el-table-column
|
|
|
- prop="info"
|
|
|
+ prop="productName"
|
|
|
label="商品信息">
|
|
|
<template slot-scope="scope">
|
|
|
<div class="TT-goods_info">
|
|
@@ -31,18 +31,18 @@
|
|
|
<div class="TT-order-list">
|
|
|
<div class="count">
|
|
|
<p>商品型号:1款</p>
|
|
|
- <p>总计件数:1件</p>
|
|
|
+ <p>总计件数:{{ tableData.length }}件</p>
|
|
|
</div>
|
|
|
<p class="money">
|
|
|
<span>总计商品费用: </span>
|
|
|
- <span class="col_f64f6f">¥{{ tableData[0].productPrice }}</span>
|
|
|
+ <span class="col_f64f6f">{{ tableData.reduce((total, cur) => total + cur.productPrice, 0) }}金币</span>
|
|
|
</p>
|
|
|
</div>
|
|
|
<div class="TT-order-list">
|
|
|
- <p>快递件数:1件</p>
|
|
|
+ <p>快递件数:{{ tableData.length }}件</p>
|
|
|
<p class="money">
|
|
|
<span>总计快递费用:</span>
|
|
|
- <span class="col_f64f6f">¥{{ tableData[0].warehpusePrice }}</span>
|
|
|
+ <span class="col_f64f6f">{{ tableData.reduce((total, cur) => total + cur.warehpusePrice, 0) }}金币</span>
|
|
|
</p>
|
|
|
</div>
|
|
|
</el-card>
|
|
@@ -51,7 +51,10 @@
|
|
|
<el-button type="primary"
|
|
|
:disabled="isDisabled"
|
|
|
class="TT-submit-button"
|
|
|
- @click="submitForm('ruleForm')">支付{{ info.orderPrice }}
|
|
|
+ @click="submitForm('ruleForm')">支付
|
|
|
+ {{
|
|
|
+ tableData.reduce((total, cur) => total + cur.productPrice, 0) + tableData.reduce((total, cur) => total + cur.warehpusePrice, 0)
|
|
|
+ }}金币
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -112,6 +115,13 @@ export default {
|
|
|
}).then(({ data }) => {
|
|
|
this.isDisabled = false
|
|
|
if (data.status) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: data.msg,
|
|
|
+ onClose: () => {
|
|
|
+ this.$router.push({ name: 'orderCheckOrder' })
|
|
|
+ }
|
|
|
+ })
|
|
|
return
|
|
|
}
|
|
|
this.$message.error(data.msg)
|