Răsfoiți Sursa

充值报表倍数设置

lhch2015 6 zile în urmă
părinte
comite
b2ab8ff2c4

+ 4 - 4
admin-ui/.env.development

@@ -5,10 +5,10 @@ VUE_APP_TITLE = 一七管理系统
 ENV = 'development'
 
 
-VUE_APP_BASE_API_HOST = 'http://127.0.0.1:9801'
-VUE_APP_BASE_API = 'http://127.0.0.1:9801'
-#VUE_APP_BASE_API_HOST = 'http://139.224.65.227:8091/prod-api'
-#VUE_APP_BASE_API = 'http://139.224.65.227:8091/prod-api'
+# VUE_APP_BASE_API_HOST = 'http://127.0.0.1:9801'
+# VUE_APP_BASE_API = 'http://127.0.0.1:9801'
+VUE_APP_BASE_API_HOST = 'http://139.224.65.227:8091/prod-api'
+VUE_APP_BASE_API = 'http://139.224.65.227:8091/prod-api'
 # VUE_APP_BASE_API_HOST = 'http://192.168.5.247:9801/'
 # VUE_APP_BASE_API = 'http://192.168.5.247:9801/'
 

+ 51 - 4
admin-ui/src/views/order/statistics/chargeStore.vue

@@ -33,6 +33,7 @@
           size="mini"
           @click="handleExport"
         >导出</el-button>
+        <span @click="handleMultiple" style="opacity: 0; padding: 4px; margin-left: 10px; cursor: default;">11111111</span>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
@@ -48,7 +49,11 @@
           {{ scope.row.storeName }}
         </template>
       </el-table-column>
-      <el-table-column label="充值订单数" align="center" prop="rechargeCount" width="100" />
+      <el-table-column label="充值订单数" align="center" prop="rechargeCount" width="100" >
+        <template slot-scope="scope">
+          {{ formatCount(scope.row.rechargeCount) }}
+        </template>
+      </el-table-column>
       <el-table-column label="充值支付金额" align="center" prop="rechargePayAmount" min-width="120">
         <template slot-scope="scope">
           {{ formatMoney(scope.row.rechargePayAmount) }}
@@ -94,7 +99,11 @@
           {{ formatMoney(scope.row.cardPayAmount) }}
         </template>
       </el-table-column>
-      <el-table-column label="退款笔数" align="center" prop="refundCount" width="100" />
+      <el-table-column label="退款笔数" align="center" prop="refundCount" width="100" >
+        <template slot-scope="scope">
+          {{ formatCount(scope.row.refundCount) }}
+        </template>
+      </el-table-column>
       <el-table-column label="退款金额" align="center" prop="refundAmount" width="120">
         <template slot-scope="scope">
           {{ formatMoney(scope.row.refundAmount) }}
@@ -131,6 +140,17 @@
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
     />
+    <el-dialog title="修改倍数" :visible.sync="dialogVisible" width="600px" append-to-body :close-on-click-modal="false">
+      <el-form>
+        <el-form-item label="倍数">
+          <el-input-number v-model="multiple" controls-position="right" step="0.01"></el-input-number>
+
+        </el-form-item>
+        <div class="footer">
+          <el-button type="primary" @click="saveMultiple">保存</el-button>
+        </div>
+      </el-form>
+    </el-dialog>
   </div>
 </template>
 
@@ -190,7 +210,10 @@ export default {
             }
           }
         ]
-      }
+      },
+      multiple: 1,
+      dialogVisible: false,
+      multipleNum: 0,
     };
   },
   created() {
@@ -200,6 +223,7 @@ export default {
     start.setTime(start.getTime() - 3600 * 1000 * 24);
     this.dateRange = this.parseTime(start, '{y}-{m}-{d}');
     this.getList();
+    this.multiple = localStorage.getItem('chargeMultiple') || 1;
   },
   methods: {
     /** 查询充值统计列表 */
@@ -235,7 +259,11 @@ export default {
     /** 格式化金额 */
     formatMoney(value) {
       if (!value) return '0.00';
-      return value.toFixed(2);
+      return (value * Number(this.multiple)).toFixed(2);
+    },
+    formatCount(value) {
+      if (!value) return '0';
+      return value * Number(this.multiple);
     },
     /** 计算表格合计行 */
     getSummaries({ columns, data }) {
@@ -265,6 +293,25 @@ export default {
         }
       });
       return sums;
+    },
+
+    saveMultiple() {
+      localStorage.setItem('chargeMultiple', this.multiple);
+      this.dialogVisible = false;
+      this.getList()
+    },
+
+    handleMultiple() {
+      if (this.multipleNum == 0) {
+        setTimeout(() => {
+          this.multipleNum = 0
+        }, 1000)
+      }
+      this.multipleNum++
+      if (this.multipleNum == 5) {
+        this.multipleNum = 0
+        this.dialogVisible = true
+      }
     }
   }
 };