Browse Source

销售公司更新 10.31 zyp

阿拉蕾 1 năm trước cách đây
mục cha
commit
d3a588284a
2 tập tin đã thay đổi với 96 bổ sung78 xóa
  1. 75 58
      src/views/qw/qwChat/qq.vue
  2. 21 20
      src/views/store/components/productOrder.vue

+ 75 - 58
src/views/qw/qwChat/qq.vue

@@ -5,7 +5,7 @@
           :width="windowWidth"
           :height="windowHeight"
           :user="UserData"
-           ref="IMUI"  
+           ref="IMUI"
           :contextmenu="contextmenu"
           :contact-contextmenu="contactContextmenu"
           :theme="theme"
@@ -35,10 +35,10 @@
                     <span style="font-size:12px;">
                       <span>打开抽屉:</span>
                       <span style="cursor:pointer;"  @click="openDrawer('right')">
-                        右侧  | 
+                        右侧  |
                       </span>
                       <span style="cursor:pointer;" @click="openDrawer('rightInside')">
-                        右侧内部  | 
+                        右侧内部  |
                       </span>
                       <span style="cursor:pointer;" @click="openDrawer('center')">
                         居中
@@ -51,7 +51,7 @@
                       <span>相册</span>
                       <span>文件</span>
                       <span>活动</span>
-                      <span>设置(左键弹出菜单)</span> 
+                      <span>设置(左键弹出菜单)</span>
                 </div>
             </div>
           </template>
@@ -73,27 +73,27 @@
                       <input class="slot-search" placeholder="搜索群成员" />
                       <div class="slot-group-member">
                         <div class="avatar"><img src="https://p.qqan.com/up/2020-2/2020022821001845128.jpg"></div>
-                        <div class="name">像梦一样自由</div> 
+                        <div class="name">像梦一样自由</div>
                       </div>
                       <div class="slot-group-member">
                         <div class="avatar"><img src="https://p.qqan.com/up/2018-4/15244505348390471.jpg"></div>
-                        <div class="name">野火</div> 
+                        <div class="name">野火</div>
                       </div>
                       <div class="slot-group-member">
                         <div class="avatar"><img src="https://p.qqan.com/up/2021-1/20211411391666.jpg"></div>
-                        <div class="name">霸王花</div> 
+                        <div class="name">霸王花</div>
                       </div>
                        <div class="slot-group-member">
                         <div class="avatar"><img src="https://p.qqan.com/up/2021-1/2021113104111220.jpg"></div>
-                        <div class="name">森系Style</div> 
+                        <div class="name">森系Style</div>
                       </div>
-                      
+
                     </div>
                </div>
           </template>
         </lemon-imui>
       </div>
-   
+
 
        <el-dialog :visible.sync="dialogVisible">
          <img width="100%" :src="dialogImageUrl" alt="">
@@ -271,7 +271,7 @@ export default {
     };
   },
   created(){
-    
+
     //  this.$store.dispatch('qwLoginOut').then(() => {
     //  });
   },
@@ -329,13 +329,13 @@ export default {
             lastContent: "你好123",
     };
     const IMUI = this.$refs.IMUI;
-    
+
     var conversationData = Conversations.filter(item => item.conversationId<=1688856679458971);
     conversationData.sort((a1, a2) => {
       return a2.lastSendTime - a1.lastSendTime;
     });
 
-  
+
     // IMUI.initContacts(ContactsData);
     // IMUI.initConversations(conversationData);
     // setTimeout(() => {
@@ -344,7 +344,7 @@ export default {
 
     this.getContacts();  //获取联系人信息
     this.getConversation();   //获取会话信息
-  
+
     IMUI.initMenus([
       {
         name: "messages",
@@ -400,8 +400,8 @@ export default {
       },
     ]);
 
-    IMUI.initEmoji(EmojiData); 
-  
+    IMUI.initEmoji(EmojiData);
+
   },
 
   methods: {
@@ -439,7 +439,7 @@ export default {
                                     getConversation(queryParams).then(response => {
                                           if(response.code==200){
                                               var conversation=response.data;
-                                              IMUI.appendConversation(conversation); 
+                                              IMUI.appendConversation(conversation);
                                               that.appendMessageAction(msgData);
                                           }
                                    });
@@ -455,7 +455,7 @@ export default {
                                               }else{
                                                 conversation.unread+=1;
                                               }
-                                             
+
                                               IMUI.topPopConversations(conversation);
 
                                           }
@@ -469,8 +469,8 @@ export default {
                   };
               }
     },
-  
-    getContacts(){  
+
+    getContacts(){
       getContactsByUser(this.qwUser.userId).then(response => {
            this.contactData = response.data;
            this.$refs.IMUI.initContacts(this.contactData);
@@ -494,36 +494,36 @@ export default {
            //console.log("qxj request conversation:"+JSON.stringify(response.data));
       });
     },
-    appendMessageAction(msgData){
-          if(msgData.type=="text"){   //文本
-              const message = {
-                    id: msgData.id,
-                    status: msgData.status,
-                    type: msgData.type,
-                    sendTime: msgData.sendTime,
-                    content: msgData.content,
-                    params1: "1",
-                    params2: "2",
-                    toContactId: msgData.toContactId,
-                    fromUser: msgData.fromUser,
-              };
-              this.appendRemoteMessage(message);
-           }
-           if(msgData.type=="image"){   //图片
-              const message = {
-                    id: msgData.id,
-                    status: msgData.status,
-                    type: msgData.type,
-                    sendTime: msgData.sendTime,
-                    content: msgData.content,
-                    params1: "1",
-                    params2: "2",
-                    toContactId: msgData.toContactId,
-                    fromUser: msgData.fromUser,
-              };
-              this.appendRemoteMessage(message);
-           }
-    },
+    // appendMessageAction(msgData){
+    //       if(msgData.type=="text"){   //文本
+    //           const message = {
+    //                 id: msgData.id,
+    //                 status: msgData.status,
+    //                 type: msgData.type,
+    //                 sendTime: msgData.sendTime,
+    //                 content: msgData.content,
+    //                 params1: "1",
+    //                 params2: "2",
+    //                 toContactId: msgData.toContactId,
+    //                 fromUser: msgData.fromUser,
+    //           };
+    //           this.appendRemoteMessage(message);
+    //        }
+    //        if(msgData.type=="image"){   //图片
+    //           const message = {
+    //                 id: msgData.id,
+    //                 status: msgData.status,
+    //                 type: msgData.type,
+    //                 sendTime: msgData.sendTime,
+    //                 content: msgData.content,
+    //                 params1: "1",
+    //                 params2: "2",
+    //                 toContactId: msgData.toContactId,
+    //                 fromUser: msgData.fromUser,
+    //           };
+    //           this.appendRemoteMessage(message);
+    //        }
+    // },
     messageTimeFormat(time) {
       //console.log("qxj messageTimeFormat:"+time);
       return this.friendlyDate(time);
@@ -587,7 +587,21 @@ export default {
     },
     //接收消息回调
     appendMessageAction(msgData){
-          if(msgData.type=="text"){   //文本   text  image  video voice 
+          if(msgData.type=="text"){   //文本   text  image  video voice
+              const message = {
+                    id: msgData.id,
+                    status: msgData.status,
+                    type: msgData.type,
+                    sendTime: msgData.sendTime,
+                    content: msgData.content,
+                    params1: "1",
+                    params2: "2",
+                    toContactId: msgData.toContactId,
+                    fromUser: msgData.fromUser,
+              };
+              this.appendRemoteMessage(message);
+           }
+           if(msgData.type=="image"){   //文本   text  image  video voice
               const message = {
                     id: msgData.id,
                     status: msgData.status,
@@ -606,11 +620,14 @@ export default {
     handleSend(message, next, file) {
       console.log(JSON.stringify(message));
       var params={};
+      const { IMUI } = this.$refs;
       if(message.type=="text"){  //text   image   voice   video
           params={"conversationId":message.toContactId,"deviceId":this.qwUser.deviceId,"userId":this.qwUser.userId,"content":message.content};
           sendTextMsg(params).then(response => {
               if(response.code==200){
-                  next();
+                var conversation=IMUI.findConversationIndexById(message.toContactId);
+                IMUI.topPopConversations(conversation);
+                next();
               }
           });
       }
@@ -760,7 +777,7 @@ export default {
 
 <style lang="scss" scoped>
     .imui-center{
-        margin-bottom:"60px"; 
+        margin-bottom:"60px";
         display: flex;
         align-items: center;
         justify-content: center;
@@ -792,7 +809,7 @@ export default {
         background: #111;
         padding: 0 8px;
     }
-    
+
 </style>
 
 
@@ -805,7 +822,7 @@ export default {
         padding:0 0 10px 0;
         .slot-group-notice
            padding: 10px 10px;
-     
+
       .slot-search
            width:calc(100% - 20px) ;
            margin:5px 10px;
@@ -822,7 +839,7 @@ export default {
               height: 30px;
               line-height: 30px;
               margin-right:5px;
-              img 
+              img
                 vertical-align: middle;
                 border-style: none;
                 width: 100%;
@@ -830,6 +847,6 @@ export default {
                 line-height: 30px;
                 border-radius: 50%;
 
-      
 
-</style>
+
+</style>

+ 21 - 20
src/views/store/components/productOrder.vue

@@ -15,14 +15,14 @@
         <span  style="margin-left: 20px" class="color-danger">订单状态:
            <el-tag prop="status" v-for="(item, index) in statusOptions"    v-if="order.status==item.dictValue">{{item.dictLabel}}</el-tag>
         </span>
-       
+
         <div class="operate-button-container" >
           <el-button size="mini" @click="handleCertificates()"  v-hasPermi="['store:storeOrder:uploadCredentials']" >上传凭证</el-button>
           <el-button size="mini" @click="handleEditAddress()" v-if="order.status==0||order.status==1"  v-hasPermi="['store:storeOrder:editAddress']" >修改收货地址</el-button>
           <el-button size="mini" @click="handleBindCustomer()"  v-hasPermi="['store:storeOrder:bindCustomer']" >关联客户</el-button>
           <el-button size="mini" @click="editOrder()"  v-hasPermi="['store:storeOrder:edit']" >修改订单</el-button>
           <!-- <el-button size="mini" @click="handleEditUser()"  v-hasPermi="['users:user:edit']" >修改会员修改</el-button> -->
-          <el-button size="mini" v-if="order.customerId!=null&&order.customerId>0"  @click="handleCustomer()"    >查看客户详情</el-button>         
+          <el-button size="mini" v-if="order.customerId!=null&&order.customerId>0"  @click="handleCustomer()"    >查看客户详情</el-button>
         </div>
         <div class="operate-button-container"  v-hasPermi="['store:storeOrder:express']"  >
           <el-button size="mini" @click="showExpress()" >查看物流</el-button>
@@ -48,7 +48,7 @@
             </el-descriptions-item>
             <!-- <el-descriptions-item label="进线时间"  >
                 <span v-if="user!=null">
-                  {{user.registerDate}} 
+                  {{user.registerDate}}
                 </span>
             </el-descriptions-item>
             <el-descriptions-item label="推线编码"  >
@@ -56,7 +56,7 @@
                   {{user.registerCode}}
                 </span>
             </el-descriptions-item> -->
-             
+
             <el-descriptions-item label="收货人"  >
                 <span v-if="order!=null ">
                   {{order.realName }}
@@ -127,7 +127,7 @@
                   {{customerInfo.registerDate }}
                 </span>
             </el-descriptions-item>
-        
+
       </el-descriptions>
       <div style="margin: 20px 0px"  v-if="order!=null">
         <span class="font-small">
@@ -283,7 +283,7 @@
             <el-select filterable style="width: 200px" v-model="editForm.scheduleId" placeholder="请选择档期" clearable size="small" >
               <el-option
                       v-for="item in scheduleOptions"
-                      :key="item.id"  
+                      :key="item.id"
                       :label="item.name"
                       :value="item.id"
                     />
@@ -300,7 +300,7 @@
     <el-dialog :title="editUser.title" :visible.sync="editUser.open" width="600px" append-to-body>
       <el-form ref="editUserForm" :model="editUserForm" :rules="editUserRules" label-width="100px">
          <el-form-item label="进线时间" prop="registerDate">
-          <el-date-picker clearable size="small"  
+          <el-date-picker clearable size="small"
             v-model="editUserForm.registerDate"
             type="date"
             value-format="yyyy-MM-dd"
@@ -400,7 +400,7 @@
               <el-button type="primary" @click="searchCustomer">查看</el-button>
             </el-col>
           </el-row>
-          
+
         </el-form-item>
         <el-form-item label="客户选择"  prop="customerIds">
           <el-table   @selection-change="handleSelectionChange"
@@ -454,13 +454,14 @@ import {updateUser,getUser } from "@/api/users/user";
 import { getTcmScheduleList } from "@/api/company/tcmScheduleReport";
 import {getCustomerListBySearch } from "@/api/crm/customer";
 import ImageUpload from '@/components/ImageUpload'
+import Material from '@/components/Material'
 import {bindCustomer,getExpress, listStoreOrder, getStoreOrder, delStoreOrder, addStoreOrder, updateStoreOrder, exportStoreOrder,uploadCredentials } from "@/api/store/storeOrder";
 import {getAllList} from "@/api/store/city";
 import customerDetails from '../../crm/components/customerDetails.vue';
 export default {
   name: "order",
-  components: {customerDetails, 
-    ImageUpload },
+  components: {customerDetails,
+    ImageUpload,Material },
   data() {
     return {
       scheduleOptions:[],
@@ -513,7 +514,7 @@ export default {
       },
       editAddressForm:{
         districtId:null,
-        
+
       },
       editAddressRules:{
 
@@ -594,7 +595,7 @@ export default {
       }
       var data={mobile:this.bindCustomerForm.mobile};
       getCustomerListBySearch(data).then(response => {
-          this.customers=response.data;        
+          this.customers=response.data;
       });
     },
     handleBindCustomer() {
@@ -639,7 +640,7 @@ export default {
           if(this.express!=null&&this.express.Traces!=null){
               this.traces=this.express.Traces
           }
-          
+
       });
 
     },
@@ -658,8 +659,8 @@ export default {
       })
       console.log(item)
       this.editAddressForm.city=item.name;
- 
-        
+
+
     },
     provinceChange(val){
       this.city=this.citys.filter(item => item.parentId===val )
@@ -693,7 +694,7 @@ export default {
         var city=this.citys.find((item)=>{
           return item.name==address[1]&&item.level==1;
         })
-        
+
         if(city!=null){
           this.editAddressForm.cityId=city.cityId;
           this.district=this.citys.filter(item => item.parentId===city.cityId&&item.level==2 )
@@ -704,7 +705,7 @@ export default {
         if(district!=null){
           this.editAddressForm.districtId=district.cityId;
         }
-        
+
         this.editAddress.open = true;
     },
     /** 提交按钮 */
@@ -756,7 +757,7 @@ export default {
               this.getOrder(this.order.id);
             }
           });
-       
+
         }
       });
     },
@@ -768,7 +769,7 @@ export default {
           this.editForm.orderType=this.order.orderType.toString();
         }
         this.editForm.scheduleId=this.order.scheduleId;
-        
+
     },
     getOrder(orderId){
         this.orderId=orderId;
@@ -777,7 +778,7 @@ export default {
             this.order = response.order;
             if(response.order.certificates != null){
               this.certificates = response.order.certificates;
-            }  
+            }
             this.user = response.user;
             this.logs = response.logs;
             this.items = response.items;