Pārlūkot izejas kodu

产品名称 下单时间

yuhongqi 2 nedēļas atpakaļ
vecāks
revīzija
ad127c0dfb

+ 9 - 1
src/views/live/liveConsole/index.vue

@@ -1078,7 +1078,7 @@ export default {
           if (code === 200) {
             // 清空现有消息列表,只保留最新的30条
             this.msgList = [];
-            
+
             rows.forEach(row => {
               let user = this.userList.find(u => u.userId === row.userId)
               if (user) {
@@ -1248,6 +1248,14 @@ export default {
               this.$refs.manageRightRef.wrap.scrollTop = this.$refs.manageRightRef.wrap.scrollHeight - this.$refs.manageRightRef.wrap.clientHeight
             }, 200)
           })
+        } else if (cmd === 'deleteMsg') {
+          const msgId = data.msgId != null ? data.msgId : (data.msg != null ? Number(data.msg) : null)
+          if (msgId != null) {
+            const index = this.msgList.findIndex(item => item.msgId == msgId)
+            if (index !== -1) {
+              this.msgList.splice(index, 1)
+            }
+          }
         } else if (cmd === 'entry' || cmd === 'out') {
           const user = data;
           const online = cmd === 'entry' ? 0 : 1; // 0=在线,1=离线

+ 5 - 4
src/views/live/liveOrder/liveOrderDetails.vue

@@ -190,8 +190,8 @@
           <span v-else-if="item!=null">¥0.00</span>
         </el-descriptions-item>
         </el-descriptions>
-        <div style="float: right;margin: 20px" v-if="item.totalPrice!=null">
-          合计:<span class="color-danger">¥{{item.totalPrice.toFixed(2)}}</span>
+        <div style="float: right;margin: 20px" v-if="item.payMoney!=null">
+          合计:<span class="color-danger">¥{{item.payMoney.toFixed(2)}}</span>
         </div>
       </div>
 
@@ -481,11 +481,12 @@ export default {
      * 折扣率百分比(四舍五入保留两位小数),用于费用信息展示
      */
     discountRatePercent() {
-      if (!this.item || this.productTotal <= 0) {
+      if (!this.item || !this.item.totalPrice || parseFloat(this.item.totalPrice) <= 0) {
         return '0.00';
       }
       const payMoney = parseFloat(this.item.payMoney) || 0;
-      const rate = parseFloat((payMoney / this.productTotal).toFixed(2));
+      const totalPrice = parseFloat(this.item.totalPrice) || 0;
+      const rate = parseFloat((payMoney / totalPrice).toFixed(2));
       return (rate * 100).toFixed(2);
     }
   },