furffico 1 tahun lalu
induk
melakukan
b81ccdea52

+ 2 - 0
src/components/base-table/config.js

@@ -1,4 +1,5 @@
 import { datetime_format } from '@/utils/formatters'
+import { database2real } from "@/utils/currency"
 
 export const order = {
   columns: [
@@ -17,6 +18,7 @@ export const order = {
     {
       title: "订单金额",
       dataIndex: "totalFee",
+      scopedSlots: { customRender: database2real },
     },
     {
       title: "支付方式",

+ 7 - 2
src/views/modules/liveroom/liveroomList.vue

@@ -1,6 +1,7 @@
 <template>
   <div>
-    <avue-crud ref="crud" :page="page" :data="dataList" :option="tableOption" @on-load="getDataList">
+    <avue-crud ref="crud" :page="page" :data="dataList" :option="tableOption" @on-load="getDataList"
+      @search-change="searchChange">
       <template slot="menuLeft">
         <el-button type="primary" icon="el-icon-plus" size="small"
           @click.stop="$router.push({ name: 'liveroomEdit', params: { id: 'new' } })">新增</el-button>
@@ -12,7 +13,8 @@
 
       <template slot-scope="{row}" slot="startup">
         <div class="icon-button">
-          <el-button type="primary" size="small" @click="startLiveRoom(row)"><icon-svg name="play" /></el-button>
+          <el-button type="primary" size="small" @click="startLiveRoom(row)" :disabled="row.startTime !== null"><icon-svg
+              name="play" /></el-button>
         </div>
       </template>
 
@@ -72,6 +74,9 @@ export default Vue.extend({
         }
       })
     },
+    searchChange(params: any, done?: Function) {
+      this.getDataList(this.page, params.title, done)
+    },
     updateShowStatus(id: number, status: boolean) {
       httpx.post("/rooms/updateRoomShowStatus", { id, showInList: status }).then((data) => {
         this.getDataList()

+ 13 - 4
src/views/modules/liveroom/liveroomStats.vue

@@ -35,6 +35,7 @@ import dayjs from 'dayjs';
 import toSafeInteger from 'lodash/toSafeInteger';
 import httpx from '@/utils/httpx';
 import { datetime_format } from '@/utils/formatters';
+import { start } from 'repl';
 
 
 echarts_use([
@@ -103,10 +104,18 @@ export default Vue.extend({
           statResultZy: number[]
         }
       }) => {
-        this.data = {
-          time: result.statResultTime.map((v => dayjs(v).toDate())),
-          wx: result.statResultWx,
-          zy: result.statResultZy,
+        if (result.statResultTime.length > 0) {
+          this.data = {
+            time: result.statResultTime.map((v => dayjs(v).toDate())),
+            wx: result.statResultWx,
+            zy: result.statResultZy,
+          }
+        } else {
+          this.data = {
+            time: [dayjs(startTime).toDate(), dayjs(endTime).toDate()],
+            wx: [0, 0],
+            zy: [0, 0],
+          }
         }
       }).catch((e) => {
         this.data = null

+ 2 - 0
src/views/modules/order/showDialog.vue

@@ -33,6 +33,7 @@
 <script>
 import BaseTable from "./order-BaseTable.vue"
 import { datetime_format } from "@/utils/formatters";
+import { database2real } from "@/utils/currency";
 export default {
     name: 'showDialog',
     components: { BaseTable, },
@@ -60,6 +61,7 @@ export default {
             }, {
                 title: "价格",
                 dataIndex: "goodsPrice",
+                scopedSlots: { customRender: database2real },
             }, {
                 title: "数量",
                 dataIndex: "goodsAmount",