Browse Source

买卖家联系逻辑整体修改

yangc 7 years ago
parent
commit
62d5cad30f

+ 13 - 22
src/main/webapp/resources/js/common/module/chat_web_module.js

@@ -139,29 +139,20 @@ define([ 'common/query/chat', 'common/query/enterprise' ], function() {
 			// //获得窗口的水平位置
 			// //获得窗口的水平位置
 			// var iLeft = (window.screen.availWidth - 10 - 1030) / 2;
 			// var iLeft = (window.screen.availWidth - 10 - 1030) / 2;
 			// if (!/^1\d{10}$/.test(phone)){
 			// if (!/^1\d{10}$/.test(phone)){
-			// if (!phone){
-			// 	ChatBusinessLayer.getAdminInfo(enUU).then(function (tel) {
-			// 		phone = tel;
-			// 		/*if (!/^1\d{10}$/.test(phone)){
-			// 			toaster.pop('warning', '该店铺暂无管理员电话号码!');
-			// 			return;
-			// 		}*/
-			// 		openChatBox(phone);
-			// 		// startChat(phone,enUU,userType,iTop,iLeft);
-			// 	});
-			// }else {
-			// 	openChatBox(phone);
-             //    // startChat(phone,enUU,userType,iTop,iLeft);
-			// }
-			ChatBusinessLayer.getAdminInfo(enUU).then(function (tel) {
-				phone = tel;
-				/*if (!/^1\d{10}$/.test(phone)){
-				 toaster.pop('warning', '该店铺暂无管理员电话号码!');
-				 return;
-				 }*/
+			if (!phone){
+				ChatBusinessLayer.getAdminInfo(enUU).then(function (tel) {
+					phone = tel;
+					/*if (!/^1\d{10}$/.test(phone)){
+						toaster.pop('warning', '该店铺暂无管理员电话号码!');
+						return;
+					}*/
+					openChatBox(phone);
+					// startChat(phone,enUU,userType,iTop,iLeft);
+				});
+			}else {
 				openChatBox(phone);
 				openChatBox(phone);
-				// startChat(phone,enUU,userType,iTop,iLeft);
-			});
+                // startChat(phone,enUU,userType,iTop,iLeft);
+			}
 		}
 		}
 
 
 		$scope.showLinkBox = false;
 		$scope.showLinkBox = false;

+ 1 - 1
src/main/webapp/resources/view/usercenter/forstore/bomDetail.html

@@ -661,7 +661,7 @@
                                         <td width="186"><span>{{of.currency + of.unitPrice | currencyStr}}</span></td>
                                         <td width="186"><span>{{of.currency + of.unitPrice | currencyStr}}</span></td>
                                         <td width="195" ng-bind="of.produceDate || '-'"></td>
                                         <td width="195" ng-bind="of.produceDate || '-'"></td>
                                         <td width="221" class="operate">
                                         <td width="221" class="operate">
-                                            <a href = "of.user.usertTel">联系卖家<img src="static/img/seekPurchase/link-buyer.png" alt=""></a>
+                                            <a>联系卖家<img src="static/img/seekPurchase/link-buyer.png" alt=""></a>
                                             <img ng-if="of.status == 202" src="static/img/seekPurchase/recieved.png" alt="" class="ng-scope">
                                             <img ng-if="of.status == 202" src="static/img/seekPurchase/recieved.png" alt="" class="ng-scope">
                                             <span ng-if="seek.status != 202" ng-click="setShowUseFlag(true, of)">采纳报价</span>
                                             <span ng-if="seek.status != 202" ng-click="setShowUseFlag(true, of)">采纳报价</span>
                                         </td>
                                         </td>

+ 1 - 1
src/main/webapp/resources/view/usercenter/forstore/buyer_cart.html

@@ -597,7 +597,7 @@
 						</span>
 						</span>
 						<span style="width: 22%; text-align: left; position: relative;"><img src="static/img/common/songguo.png">
 						<span style="width: 22%; text-align: left; position: relative;"><img src="static/img/common/songguo.png">
 							<div style="display: inline-block" ng-controller="ChatContactCtrl as chat">
 							<div style="display: inline-block" ng-controller="ChatContactCtrl as chat">
-							<a name="{{store.arr[0].id}}" href="javascript:void(0)" class="contact_btn" ng-click="chat.contactWithOther(store.arr[0].sellPhone, store.arr[0].storeEnterprise.enUU, chat.UserType.STORE)">联系卖家</a>
+							<a name="{{store.arr[0].id}}" href="javascript:void(0)" class="contact_btn" ng-click="chat.contactWithOther(null, store.arr[0].storeEnterprise.enUU, chat.UserType.STORE)">联系卖家</a>
 								<div class="com-mall-del-box link-saler-box" ng-if="showLinkBox">
 								<div class="com-mall-del-box link-saler-box" ng-if="showLinkBox">
 									<div class="title">
 									<div class="title">
 									  <i ng-click="setShowLinkBox(false)"></i>
 									  <i ng-click="setShowLinkBox(false)"></i>

+ 1 - 1
src/main/webapp/resources/view/usercenter/forstore/buyer_order.html

@@ -812,7 +812,7 @@
 						<span style="position: relative; width: 10%;">
 						<span style="position: relative; width: 10%;">
                             <img src="static/img/common/songguo.png"/>
                             <img src="static/img/common/songguo.png"/>
 							<div style="display: inline-block" ng-controller="ChatContactCtrl as chat">
 							<div style="display: inline-block" ng-controller="ChatContactCtrl as chat">
-                            	<a name="{{order.id}}" href="javascript:void(0)" class="contact_btn" ng-click="chat.contactWithOther(order.sellPhone, order.sellerenuu, chat.UserType.STORE)">联系卖家</a>
+                            	<a name="{{order.id}}" href="javascript:void(0)" class="contact_btn" ng-click="chat.contactWithOther(null, order.sellerenuu, chat.UserType.STORE)">联系卖家</a>
 								<div class="com-mall-del-box link-saler-box" ng-if="showLinkBox">
 								<div class="com-mall-del-box link-saler-box" ng-if="showLinkBox">
 									<div class="title">
 									<div class="title">
 									  <i ng-click="setShowLinkBox(false)"></i>
 									  <i ng-click="setShowLinkBox(false)"></i>

+ 1 - 1
src/main/webapp/resources/view/usercenter/forstore/order_detail.html

@@ -420,7 +420,7 @@
 							</i>
 							</i>
 							<img src="static/img/common/songguo.png" style="margin-right:0; ">
 							<img src="static/img/common/songguo.png" style="margin-right:0; ">
                             <div style="display: inline-block" ng-controller="ChatContactCtrl as chat">
                             <div style="display: inline-block" ng-controller="ChatContactCtrl as chat">
-							    <a href="javascript:void(0)" class="contact_btn" title="联系卖家" ng-click="chat.contactWithOther(order.buyerTel, order.buyerenuu, chat.UserType.STORE)">联系卖家</a>
+							    <a href="javascript:void(0)" class="contact_btn" title="联系卖家" ng-click="chat.contactWithOther(null, order.buyerenuu, chat.UserType.STORE)">联系卖家</a>
 								<div class="com-mall-del-box link-saler-box" ng-if="showLinkBox">
 								<div class="com-mall-del-box link-saler-box" ng-if="showLinkBox">
 									<div class="title">
 									<div class="title">
 									  <i ng-click="setShowLinkBox(false)"></i>
 									  <i ng-click="setShowLinkBox(false)"></i>

+ 2 - 2
src/main/webapp/resources/view/usercenter/forstore/query_logistics.html

@@ -199,7 +199,7 @@
                         <span style="margin-right: 0;">订单号:</span>
                         <span style="margin-right: 0;">订单号:</span>
                         <span style="margin-left: 0; margin-right: 30px;" ng-bind="order.orderid"></span>
                         <span style="margin-left: 0; margin-right: 30px;" ng-bind="order.orderid"></span>
                         <span style="margin-right: 0px;"><img src="static/img/user/images/shop_home.png" />&nbsp;<a ng-bind="order.storeName" style="margin-left: 0;margin-right: 20px;" href="store/{{::order.storeid}}" target="_blank"></a></span>
                         <span style="margin-right: 0px;"><img src="static/img/user/images/shop_home.png" />&nbsp;<a ng-bind="order.storeName" style="margin-left: 0;margin-right: 20px;" href="store/{{::order.storeid}}" target="_blank"></a></span>
-                        <span><img src="static/img/common/songguo.png"/><a href="#" class="contact_btn" ng-controller="ChatContactCtrl as chat" ng-click="chat.contactWithOther(order.sellPhone, order.sellerenuu, chat.UserType.STORE)">联系卖家</a>
+                        <span><img src="static/img/common/songguo.png"/><a href="#" class="contact_btn" ng-controller="ChatContactCtrl as chat" ng-click="chat.contactWithOther(null, order.sellerenuu, chat.UserType.STORE)">联系卖家</a>
                             <!--<a class="contact_btn" ng-click="contactSeller()">联系卖家</a>-->
                             <!--<a class="contact_btn" ng-click="contactSeller()">联系卖家</a>-->
                             <div class="contact-box" ng-if="contactBNox">
                             <div class="contact-box" ng-if="contactBNox">
 								<div class="title"><i class="fa fa-close fa-lg" ng-click="closeBox()"></i></div>
 								<div class="title"><i class="fa fa-close fa-lg" ng-click="closeBox()"></i></div>
@@ -267,7 +267,7 @@
                                 </p>
                                 </p>
                                 <div class="empty-info">
                                 <div class="empty-info">
                                     <p class="grey" ng-if="order.deliverytype == 1301">暂时获取不到物流信息,请到快递公司官网进行查询</p>
                                     <p class="grey" ng-if="order.deliverytype == 1301">暂时获取不到物流信息,请到快递公司官网进行查询</p>
-                                    <p class="grey" ng-if="order.deliverytype != 1301">暂无物流信息,请<a style="color: #5078cb;" ng-controller="ChatContactCtrl as chat" ng-click="chat.contactWithOther(order.sellPhone, order.sellerenuu, chat.UserType.STORE)">联系卖家</a>咨询</p>
+                                    <p class="grey" ng-if="order.deliverytype != 1301">暂无物流信息,请<a style="color: #5078cb;" ng-controller="ChatContactCtrl as chat" ng-click="chat.contactWithOther(null, order.sellerenuu, chat.UserType.STORE)">联系卖家</a>咨询</p>
                                     <!--<a href="user#/order"><i class="fa fa-mail-reply fa-xs"></i>返回上一页</a>-->
                                     <!--<a href="user#/order"><i class="fa fa-mail-reply fa-xs"></i>返回上一页</a>-->
                                 </div>
                                 </div>
                             </div>
                             </div>

+ 1 - 1
src/main/webapp/resources/view/vendor/forstore/purchase_detail.html

@@ -472,7 +472,7 @@
 							</i>
 							</i>
 							<img src="static/img/common/songguo.png" style="margin-right:0; ">
 							<img src="static/img/common/songguo.png" style="margin-right:0; ">
 							<div style="display: inline-block" ng-controller="ChatContactCtrl as chat">
 							<div style="display: inline-block" ng-controller="ChatContactCtrl as chat">
-								<a name="{{purchase.id}}" href="javascript:void(0)" class="contact_btn" ng-click="chat.contactWithOther(purchase.buyPhone, purchase.buyerenuu, chat.UserType.ENTERPRISE)">联系买家</a>
+								<a name="{{purchase.id}}" href="javascript:void(0)" class="contact_btn" ng-click="chat.contactWithOther(!purchase.buyerenuu ? purchase.buyPhone : null, purchase.buyerenuu, chat.UserType.ENTERPRISE)">联系买家</a>
 								<div class="com-mall-del-box link-saler-box" ng-if="showLinkBox">
 								<div class="com-mall-del-box link-saler-box" ng-if="showLinkBox">
 									<div class="title">
 									<div class="title">
 									  <i ng-click="setShowLinkBox(false)"></i>
 									  <i ng-click="setShowLinkBox(false)"></i>

+ 15 - 1
src/main/webapp/resources/view/vendor/forstore/vendor_delivery.html

@@ -598,7 +598,21 @@
 								<!--<a ng-if="purchase.pu_buyentername" name="{{purchase.id}}" ng-controller="ChatContactCtrl as chat" ng-click="chat.contactWithOther(purchase.buyPhone, purchase.buyerenuu, chat.UserType.ENTERPRISE)">|{{purchase.pu_buyentername}}</a>-->
 								<!--<a ng-if="purchase.pu_buyentername" name="{{purchase.id}}" ng-controller="ChatContactCtrl as chat" ng-click="chat.contactWithOther(purchase.buyPhone, purchase.buyerenuu, chat.UserType.ENTERPRISE)">|{{purchase.pu_buyentername}}</a>-->
 							</i>
 							</i>
 							<img src="static/img/common/songguo.png" style="margin-right:0; ">
 							<img src="static/img/common/songguo.png" style="margin-right:0; ">
-                            <a name="{{purchase.id}}" href="javascript:void(0)" class="contact_btn" ng-controller="ChatContactCtrl as chat" ng-click="chat.contactWithOther(purchase.buyPhone, purchase.buyerenuu, chat.UserType.ENTERPRISE)">联系买家</a>
+                            <div style="display: inline-block" ng-controller="ChatContactCtrl as chat">
+                                <a name="{{purchase.id}}" href="javascript:void(0)" class="contact_btn" ng-click="chat.contactWithOther(!checkinvoice.buyerenuu ? checkinvoice.buyPhone : null, checkinvoice.buyerenuu, chat.UserType.ENTERPRISE)">联系买家</a>
+								<div class="com-mall-del-box link-saler-box" ng-if="showLinkBox">
+									<div class="title">
+									  <i ng-click="setShowLinkBox(false)"></i>
+									</div>
+									<div class="content">
+									  <p><i class="fa fa-exclamation-circle"></i>抱歉,暂时无法与买家在线沟通!</p>
+									  <p>买家联系电话:<span ng-bind="phone"></span></p>
+									  <div>
+										<a ng-click="setShowLinkBox(false)">我知道了</a>
+									  </div>
+									</div>
+								  </div>
+							</div>
 							<!--<a name="{{purchase.id}}" href="javascript:void(0)" class="contact_btn" >联系买家</a>-->
 							<!--<a name="{{purchase.id}}" href="javascript:void(0)" class="contact_btn" >联系买家</a>-->
 						</span>
 						</span>
                     </dd>
                     </dd>

+ 1 - 1
src/main/webapp/resources/view/vendor/forstore/vendor_order.html

@@ -1260,7 +1260,7 @@
 						<span style="position: relative;">
 						<span style="position: relative;">
                             <img src="static/img/common/songguo.png">
                             <img src="static/img/common/songguo.png">
 							<div style="display: inline-block" ng-controller="ChatContactCtrl as chat">
 							<div style="display: inline-block" ng-controller="ChatContactCtrl as chat">
-                            	<a name="{{purchase.id}}" href="javascript:void(0)" class="contact_btn" ng-click="chat.contactWithOther(purchase.buyPhone, purchase.buyerenuu, chat.UserType.ENTERPRISE)">联系买家</a>
+                            	<a name="{{purchase.id}}" href="javascript:void(0)" class="contact_btn" ng-click="chat.contactWithOther(!purchase.buyerenuu ? purchase.buyPhone : null, purchase.buyerenuu, chat.UserType.ENTERPRISE)">联系买家</a>
 								<div class="com-mall-del-box link-saler-box" ng-if="showLinkBox">
 								<div class="com-mall-del-box link-saler-box" ng-if="showLinkBox">
 									<div class="title">
 									<div class="title">
 									  <i ng-click="setShowLinkBox(false)"></i>
 									  <i ng-click="setShowLinkBox(false)"></i>