Browse Source

提交数据

lvhao 1 day ago
parent
commit
068e4a09b7

+ 13 - 6
template/erp/fullorder_edit.html

@@ -20,6 +20,7 @@
 	display: none;
 }
 </style>
+<link rel="stylesheet" href="{$theme}js/tishi/mTips.css?v={time()}">
 <body>
 <div class="warp">
 <div class="packing">
@@ -540,7 +541,7 @@
 <option value="{$val['id']}" data-sbpm="{$val['sbpm']}" data-type="{$val['type']}" {if $fullorder['express'] == $val['id']}selected="selected"{/if}>{$val['servicename']}</option>
 {/loop}
 </select>
-<font class="expressfa"><i id="tipdata" class="fa fa-question-circle none"></i><font class="expressfa1 none"><font class="expressfa2" style="color:#903"></font></font></font>
+<font class="expressfa"><i id="show_express" class="fa fa-question-circle " style="display: none;" ></i></font>
 </li>
 
 <li class="lengththree">
@@ -841,6 +842,7 @@
 </div>
 <div class="none fullorderdata"></div>
 <div class="zm none"></div>
+<script src="{$theme}js/tishi/mTips.js?v={time()}"></script>
 <script type="text/javascript">var addedit="/fullorder/edit/";var fh="/fullorder";
  $(".yzxx").click(function() {
 	var zsbjz = "{$fullorder['zsbjz']}";
@@ -994,17 +996,22 @@ if(eid == '2' || eid == '64')//联邦的话替换签名选项
 				success: function(a) {
 					layx.destroy('loadId');
 					if (a && a.success) {
+						
+						
 						//$('#tipdata').attr('title', a.msg);
-						$(".expressfa .expressfa2").html(a.msg);
-						$(".expressfa i").show();
-						layx.tip($(".expressfa").find(".expressfa1").html(),document.getElementById('tipdata'),'bottom');
+						
+						$("#show_express").css("display","inline-block")
+
+						showExpressTiShi(a.msg)
 					}
 					else
 					{
+						
+						$("#show_express").css("display","none")
 						//$('#tipdata').attr('title',"");
-						$(".expressfa .expressfa2").html("");
-						$(".expressfa i").hide();
+				
 					}
+					
 				}
 			});
 

+ 23 - 3
template/erp/js/fullorder-addedit.js

@@ -634,12 +634,16 @@ $("#currency").change(function(){
             if (a && a.success) {
 				
 				//$('#tipdata').attr('title', a.msg);
-				$(".expressfa .expressfa2").html(a.msg);
-				$(".expressfa i").show();
-				layx.tip($(".expressfa").find(".expressfa1").html(),document.getElementById('tipdata'),'bottom');
+				// $(".expressfa .expressfa2").html(a.msg);
+				// $(".expressfa i").show();
+				// layx.tip($(".expressfa").find(".expressfa1").html(),document.getElementById('tipdata'),'bottom');
+				$("#show_express").css("display","inline-block")
+
+				showExpressTiShi(a.msg)
             }
 			else
 			{
+				$("#show_express").css("display","none")
 				//$('#tipdata').attr('title',"");
 				$(".expressfa .expressfa2").html("");
 				$(".expressfa i").hide();
@@ -1887,4 +1891,20 @@ function checkOrderShowNotice(f) {
 		zttj(f);
 	}
 	
+}
+
+function showExpressTiShi(msg){
+	$('#show_express').off();
+	$('#show_express').on('mouseenter', function(e) {
+		//显示提示
+		mTips.c.x = 30;
+		mTips.c.y = 30;
+		mTips.s('<h1>'+msg+'</h1>', 'success');
+	});
+
+	$('#show_express').on('mouseleave', function(e) {
+		mTips.h();
+		mTips.c.x = 10;
+		mTips.c.y = 10;
+	});
 }

+ 35 - 0
template/erp/js/tishi/mTips.css

@@ -0,0 +1,35 @@
+.mTips {
+	position: fixed;
+	padding: 8px 12px;
+	color: #fff;
+	border-radius: 5px;
+	font-family: "微软雅黑";
+	z-index: 999;
+	display: inline;
+	font-size: 14px;
+}
+
+.mTips-default {
+	background-color: rgba(0, 0, 0, 0.5);
+	color: #fff;
+}
+
+.mTips-success {
+	background-color: rgba(92, 184, 92, 0.8);
+	color: #fff;
+}
+
+.mTips-info {
+	background-color: rgba(91, 192, 222, 0.8);
+	color: #fff;
+}
+
+.mTips-warning {
+	background-color: rgba(240, 173, 78, 0.8);
+	color: #fff;
+}
+
+.mTips-danger {
+	background-color: rgba(217, 83, 79, 0.8);
+	color: #fff;
+}

+ 82 - 0
template/erp/js/tishi/mTips.js

@@ -0,0 +1,82 @@
+
+var mTips = {
+	c: {
+		//配置项
+		x: 10, //x偏移量,相对于鼠标
+		y: 10, //y偏移量,相对于鼠标
+
+		style: {
+			'position': 'fixed',
+			'padding': '8px 12px',
+			'color': '#fff',
+			'border-radius': '5px',
+			'font-family': "微软雅黑",
+			'z-index': '999',
+			'display': 'inline',
+			'font-size': '14px',
+			'background-color': 'rgba(0, 0, 0, 0.5)',
+			'color': '#fff'
+
+		}
+	},
+	//show方法,用于显示提示
+
+	s: function(text, a, b) {
+		var style;
+		var fun;
+
+		if(typeof(a) == 'string') {
+			style = a;
+			fun = b;
+		} else if(typeof(a) == 'function') {
+			style = b;
+			fun = a;
+		}
+
+		if(style == 'undefined' || style == null) {
+			style = 'default';
+		}
+
+		var doc = $('<div></div>').addClass('mTips mTips-' + style).html(text).appendTo('body');
+		if(doc.css('z-index') !== '999') {
+			doc.css(this.c.style);
+		}
+
+		$(document).on('mousemove', function(e) {
+			$(".mTips").offset({
+				top: e.pageY + mTips.c.x,
+				left: e.pageX + mTips.c.y
+			})
+		});
+
+		if(fun != null && typeof(fun) != 'undefined') {
+			fun();
+		}
+
+	},
+
+	//hide方法,用于隐藏和删除提示
+	h: function(fun) {
+
+		$('.mTips').remove();
+		if(fun != 'undefined' && fun != null) {
+			fun();
+		}
+
+	},
+
+	//用于给相关属性添加提示功能
+	m: function() {
+
+		$(document).on('mouseenter', '[data-mtpis]', function(e) {
+			mTips.s($(this).attr('data-mtpis'), $(this).attr('data-mtpis-style'));
+		});
+
+		$(document).on('mouseleave', '[data-mtpis]', function(e) {
+			mTips.h();
+		});
+
+	}
+
+}
+mTips.m(); //通过此函数激活所有的