wayne 6 years ago
parent
commit
2f54d95268
1 changed files with 11 additions and 7 deletions
  1. 11 7
      pages/wo/bills/index.vue

+ 11 - 7
pages/wo/bills/index.vue

@@ -37,12 +37,12 @@
           <div class="title">交易账单</div>
           <el-tabs class="tab" v-model="activeName">
             <el-tab-pane label="全部账单" name="first">
-              <el-table :data="orderList" style="width: 100%">
+              <el-table :data="orderList" style="width: 100%" @row-click="handleRowClick">
                 <el-table-column prop="product_title" label="订单名称" width="300"/>
                 <el-table-column label="实际金额" width="100">
                   <template slot-scope="scope">
-                    <span v-if="Number(scope.row.real_amount)>0" style="color:#2F944A;">+{{scope.row.real_amount}}</span>
-                    <span v-else style="color:#FE5F00;">{{scope.row.real_amount}}</span>
+                    <span v-if="Number(scope.row.real_amount)>0" style="color:#2F944A;">+{{Number(scope.row.real_amount)/100}}</span>
+                    <span v-else style="color:#FE5F00;">{{Number(scope.row.real_amount)/100}}</span>
                   </template>
                 </el-table-column>
                 <el-table-column label="当前金额" width="100">
@@ -81,8 +81,8 @@
                 <el-table-column prop="product_title" label="订单名称" width="300"/>
                 <el-table-column label="实际金额" width="100">
                   <template slot-scope="scope">
-                    <span v-if="Number(scope.row.real_amount)>0" style="color:#2F944A;">+{{scope.row.real_amount}}</span>
-                    <span v-else style="color:#FE5F00;">{{scope.row.real_amount}}</span>
+                    <span v-if="Number(scope.row.real_amount)>0" style="color:#2F944A;">+{{Number(scope.row.real_amount)/100}}</span>
+                    <span v-else style="color:#FE5F00;">{{Number(scope.row.real_amount)/100}}</span>
                   </template>
                 </el-table-column>
                 <el-table-column label="当前金额" width="100">
@@ -121,8 +121,8 @@
                 <el-table-column prop="product_title" label="订单名称" width="300"/>
                 <el-table-column label="实际金额" width="100">
                   <template slot-scope="scope">
-                    <span v-if="Number(scope.row.real_amount)>0" style="color:#2F944A;">+{{scope.row.real_amount}}</span>
-                    <span v-else style="color:#FE5F00;">{{scope.row.real_amount}}</span>
+                    <span v-if="Number(scope.row.real_amount)>0" style="color:#2F944A;">+{{Number(scope.row.real_amount)/100}}</span>
+                    <span v-else style="color:#FE5F00;">{{Number(scope.row.real_amount)/100}}</span>
                   </template>
                 </el-table-column>
                 <el-table-column label="当前金额" width="100">
@@ -352,6 +352,10 @@ export default {
       this.pageSecond = val
       this.getOrdersSecond()
     },
+    handleRowClick(event) {
+      const orderNo = event.order_no
+      this.$router.push(`/wo/bills/${orderNo}`)
+    },
     timeFormat(el) {
       return moment.unix(el).format("YYYY-MM-DD hh:mm");
     },