Bladeren bron

需求新增

yuhongqi 1 maand geleden
bovenliggende
commit
9336444545

+ 9 - 0
src/api/store/storePayment.js

@@ -75,4 +75,13 @@ export function setPayNotify(data) {
     method: 'post',
     data: data
   })
+}
+
+// 同步直播订单状态
+export function setLivePayNotify(data) {
+  return request({
+    url: '/live/liveOrder/syncPayStatus',
+    method: 'post',
+    data: data
+  })
 }

+ 10 - 0
src/views/live/liveConsole/index.vue

@@ -1149,6 +1149,16 @@ export default {
           // 4. 关键:重新筛选所有Tab的显示列表,确保状态同步
           this.refreshUserDisplayLists(u);
 
+          // 5. 通过 WebSocket 通知后端更新 Redis 禁言列表,发消息时会据此判断
+          const wsMsg = {
+            liveId: this.liveId,
+            userId: u.userId,
+            cmd: 'mutedUser',
+            status: u.msgStatus,
+            userType: 1
+          };
+          this.socket.send(JSON.stringify(wsMsg));
+
           let msg = u.msgStatus === 0 ? "已解禁" : "已禁言"
           this.msgSuccess(msg);
           return

+ 30 - 11
src/views/live/liveOrder/liveOrderDetails.vue

@@ -321,7 +321,7 @@
 
 
     <el-dialog :title="erpDialog.title" :visible.sync="erpDialog.open" width="600px" append-to-body>
-      <div v-if="order!=null&&order.extendOrderId!=null&&order.status==1"  v-hasPermi="['live:liveOrder:updateExpress']"  >
+      <div v-if="item!=null&&item.extendOrderId!=null&&item.status==1"  v-hasPermi="['live:liveOrder:updateExpress']"  >
         <el-button size="mini" @click="updateExpress()" >同步物流发货</el-button>
       </div>
       <div class="table-layout"  v-if="erpOrder!=null">
@@ -384,8 +384,8 @@
             <el-option key="YD"  label="韵达" value="YD" />
           </el-select>
         </el-form-item>
-        <el-form-item label="物流单号" prop="deliverySn"  >
-          <el-input v-model="editDyForm.deliverySn" placeholder="请输入物流单号" />
+        <el-form-item label="物流单号" prop="deliveryId"  >
+          <el-input v-model="editDyForm.deliveryId" placeholder="请输入物流单号" />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -470,9 +470,10 @@ export default {
         followDoctorId:null,
       },
       editDyForm:{
-        orderId:null,
-        deliveryId:null,
-        deliveryCode:null,
+        id: null,
+        orderId: null,
+        deliveryId: null,
+        deliveryCode: null,
       },
       showList:true,
       edit:{
@@ -534,7 +535,7 @@ export default {
         remark:"",
       },
       editDyRules:{
-        deliverySn: [
+        deliveryId: [
           { required: true, message: "物流单号不能为空", trigger: "blur" }
         ],
         deliveryCode: [
@@ -668,10 +669,18 @@ export default {
     fmt(val) {
       return val != null ? Number(val).toFixed(2) : '0.00'
     },
-    editDelivery(){
+    editDelivery(scope){
       this.editDy.open = true;
       this.editDyForm.orderId = this.item.orderId;
-
+      if (scope && scope.row) {
+        this.editDyForm.id = scope.row.id;
+        this.editDyForm.deliveryCode = scope.row.deliverSn;
+        this.editDyForm.deliveryId = scope.row.deliverId;
+      } else {
+        this.editDyForm.id = null;
+        this.editDyForm.deliveryCode = null;
+        this.editDyForm.deliveryId = '';
+      }
     },
     showListD(){
       if(this.showList){
@@ -1047,9 +1056,16 @@ export default {
     submitEditDyForm(){
       this.$refs["editDyForm"].validate(valid => {
         if (valid) {
-          editDeliveryId({orderId: this.editDyForm.orderId,
+          const params = {
+            orderId: this.editDyForm.orderId,
             deliverSn: this.editDyForm.deliveryCode,
-            deliverId: this.editDyForm.deliverySn,type: 1}).then(response => {
+            deliverId: this.editDyForm.deliveryId,
+            type: 1
+          };
+          if (this.editDyForm.id != null) {
+            params.id = this.editDyForm.id;
+          }
+          editDeliveryId(params).then(response => {
             if (response.code === 200) {
               this.msgSuccess("操作成功");
               this.editDy.open = false;
@@ -1057,6 +1073,9 @@ export default {
                 this.item = response.data;
                 this.$parent.$parent.getList();
               });
+              getOrderExpress(this.item.orderId).then(response => {
+                this.deliverList = response.data || [];
+              });
             }
           })
         }

+ 20 - 2
src/views/store/storePayment/index.vue

@@ -160,6 +160,14 @@
           @click="handlePayNotify"
           v-hasPermi="['store:storePayment:payNotify']"
         >同步订单状态</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          size="mini"
+          @click="handleLivePayNotify"
+          v-hasPermi="['store:storePayment:payNotify']"
+        >同步直播订单状态</el-button>
       </el-col>
 	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
@@ -287,7 +295,7 @@
 </template>
 
 <script>
-import { refundStorePayment,listStorePayment, getStorePayment, delStorePayment, addStorePayment, updateStorePayment, exportStorePayment,setPayNotify } from "@/api/store/storePayment";
+import { refundStorePayment,listStorePayment, getStorePayment, delStorePayment, addStorePayment, updateStorePayment, exportStorePayment, setPayNotify, setLivePayNotify } from "@/api/store/storePayment";
 import { getCompanyList } from "@/api/company/company";
 import { listLiveOrderPayments,getLivePayment,updateLivePayment,exportLiveOrderPayments } from "@/api/live/liveOrderPayment";
 export default {
@@ -308,6 +316,7 @@ export default {
       payNotify:{
         title:"同步订单状态",
         open:false,
+        mode: "store",  // store | live
       },
       payNotifyForm:{
         tradeNo:null,
@@ -388,7 +397,8 @@ export default {
     submitPayNotifyForm(){
       this.$refs["payNotifyForm"].validate(valid => {
         if (valid) {
-          setPayNotify(this.payNotifyForm).then(response => {
+          const api = this.payNotify.mode === "live" ? setLivePayNotify : setPayNotify;
+          api(this.payNotifyForm).then(response => {
             if (response.code === 200) {
               this.msgSuccess("操作成功");
               this.payNotify.open = false;
@@ -399,6 +409,14 @@ export default {
       });
     },
     handlePayNotify(){
+      this.payNotify.title = "同步订单状态";
+      this.payNotify.mode = "store";
+      this.payNotify.open = true;
+      this.payNotifyForm.tradeNo = null;
+    },
+    handleLivePayNotify(){
+      this.payNotify.title = "同步直播订单状态";
+      this.payNotify.mode = "live";
       this.payNotify.open = true;
       this.payNotifyForm.tradeNo = null;
     },