yuhongqi vor 4 Tagen
Ursprung
Commit
ea7d1a429c

+ 25 - 2
src/views/live/liveAfteraSales/index.vue

@@ -146,6 +146,7 @@
           clearable size="small"
           v-model="dateRange"
           type="daterange"
+          @change="handlePayTimeChange"
           value-format="yyyy-MM-dd"
           start-placeholder="开始日期"
           end-placeholder="结束日期">
@@ -291,11 +292,14 @@ export default {
         deliverySn: null,
         deliveryName: null,
         status: null,
-        salesStatus: null,
+        salesStatus: null,            // 售后状态
+        orderStatus: null,// 订单状态
         isDel: null,
         userId: null,
         consignee: null,
         phoneNumber: null,
+        createTimeBegin: null,        // 创建时间起
+        createTimeEnd: null,          // 创建时间止
         address: null
       },
       // 表单参数
@@ -331,13 +335,24 @@ export default {
     this.getDicts("store_order_delivery_status").then((response) => {
       this.deliveryStatusOptions = response.data;
     });
-    this.getDicts("store_order_status").then((response) => {
+    this.getDicts("sys_live_order_status").then((response) => {
       this.orderStatusOptions = response.data;
     });
 
     this.getList();
   },
   methods: {
+    // 支付时间范围选择变化处理
+    handlePayTimeChange(value) {
+      if (value && value.length === 2) {
+        // 提取日期部分(yyyy-MM-dd),mapper会在SQL中拼接时间部分
+        this.queryParams.beginTime = value[0].substring(0, 10);
+        this.queryParams.endTime = value[1].substring(0, 10);
+      } else {
+        this.queryParams.beginTime = null;
+        this.queryParams.endTime = null;
+      }
+    },
     handleShow(row){
       this.title="售后订单"
       this.open=true;
@@ -409,6 +424,14 @@ export default {
    resetQuery() {
      this.searchKey= '';
      this.queryParams[this.searchType]=null;
+     if(this.queryParams.deliverySn) {
+       this.queryParams.deliverySn = null;
+     }
+     if(this.queryParams.deliveryStatus) {
+       this.queryParams.deliveryStatus = null;
+     }
+     this.queryParams.beginTime = null;
+     this.queryParams.endTime = null;
      this.resetForm("queryForm");
      this.handleQuery();
    },

+ 20 - 27
src/views/live/liveConsole/index.vue

@@ -1068,41 +1068,34 @@ export default {
       })
     },
     loadMsgList() {
-      // 直播间消息
+      // 直播间消息 - 只加载最近的30条
       listLiveMsg({
         liveId:this.liveId,
-        pageNum: this.msgParams.pageNum,
-        pageSize: this.msgParams.pageSize
+        pageNum: 1,
+        pageSize: 30
       }).then(response => {
-          let {code, rows,total} = response;
+          let {code, rows} = response;
           if (code === 200) {
-            let totalPage = (total % this.msgParams.pageSize == 0) ? Math.floor(total / this.msgParams.pageSize) : Math.floor(total / this.msgParams.pageSize + 1);
+            // 清空现有消息列表,只保留最新的30条
+            this.msgList = [];
+            
             rows.forEach(row => {
-              if (!this.msgList.some(m => m.msgId === row.msgId)) {
-
-                let user = this.userList.find(u => u.userId === row.userId)
-                if (user) {
-                  row.msgStatus = user.msgStatus
-                } else {
-                  row.msgStatus = 0
-                }
-
-                this.msgList.push(row)
-
-                // 移动到底部
-                this.$nextTick(() => {
-                  setTimeout(() => {
-                    this.$refs.manageRightRef.wrap.scrollTop = this.$refs.manageRightRef.wrap.scrollHeight - this.$refs.manageRightRef.wrap.clientHeight
-                  }, 200)
-                })
+              let user = this.userList.find(u => u.userId === row.userId)
+              if (user) {
+                row.msgStatus = user.msgStatus
+              } else {
+                row.msgStatus = 0
               }
+
+              this.msgList.push(row)
             })
 
-            // 没加载完继续加载
-            if (this.msgParams.pageNum < this.loadMsgMaxPage) {
-              this.msgParams.pageNum = parseInt(this.msgParams.pageNum) + 1;
-              this.loadMsgList()
-            }
+            // 移动到底部
+            this.$nextTick(() => {
+              setTimeout(() => {
+                this.$refs.manageRightRef.wrap.scrollTop = this.$refs.manageRightRef.wrap.scrollHeight - this.$refs.manageRightRef.wrap.clientHeight
+              }, 200)
+            })
 
             // 同步更新消息列表中相同用户的状态
             this.userList.forEach(u => {

+ 20 - 17
src/views/live/liveOrder/index.vue

@@ -107,18 +107,18 @@
             @change="handlePayTimeChange"
           />
         </el-form-item>
-        <el-form-item label="完成时间" prop="finishTimeStart">
-          <el-date-picker
-            v-model="finishTimeRange"
-            type="daterange"
-            value-format="yyyy-MM-dd"
-            range-separator="至"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            size="small"
-            @change="handleFinishTimeChange"
-          />
-        </el-form-item>
+<!--        <el-form-item label="完成时间" prop="finishTimeStart">-->
+<!--          <el-date-picker-->
+<!--            v-model="finishTimeRange"-->
+<!--            type="daterange"-->
+<!--            value-format="yyyy-MM-dd"-->
+<!--            range-separator="至"-->
+<!--            start-placeholder="开始日期"-->
+<!--            end-placeholder="结束日期"-->
+<!--            size="small"-->
+<!--            @change="handleFinishTimeChange"-->
+<!--          />-->
+<!--        </el-form-item>-->
         <el-form-item label="员工姓名" prop="companyUserName">
           <el-input
             v-model="queryParams.companyUserName"
@@ -317,12 +317,13 @@ export default {
     },
     // 支付时间范围处理
     handlePayTimeChange(val) {
-      if (val && val.length === 2) {
-        this.queryParams.payTimeStart = val[0];
-        this.queryParams.payTimeEnd = val[1];
+      if (value && value.length === 2) {
+        // 提取日期部分(yyyy-MM-dd),mapper会在SQL中拼接时间部分
+        this.queryParams.payStartTime = value[0].substring(0, 10);
+        this.queryParams.payEndTime = value[1].substring(0, 10);
       } else {
-        this.queryParams.payTimeStart = null;
-        this.queryParams.payTimeEnd = null;
+        this.queryParams.payStartTime = null;
+        this.queryParams.payEndTime = null;
       }
     },
     // 完成时间范围处理
@@ -421,6 +422,8 @@ export default {
         deliverySendTimeStart: null,
         deliverySendTimeEnd: null,
       };
+      this.queryParams.deliverySendTimeStart = null;
+      this.queryParams.deliverySendTimeEnd = null;
       if (this.actName !== "10") {
         this.queryParams.status = this.actName;
       }