Browse Source

三元微信

miaofuhao 6 years ago
parent
commit
9cfaaf8d32

+ 1 - 1
WeChat/Script/Common/huayi.config.js

@@ -2,7 +2,7 @@
2 2
     var huayi = {};
3 3
 }
4 4
 huayi.config = {
5
-    callcenter_url: "http://117.160.143.199:4669/",//生产环境 前端Web站IP和端口
5
+    callcenter_url: "http://117.160.143.195:4669/",//生产环境 前端Web站IP和端口
6 6
     //callcenter_url: "http://117.158.196.116:4617/",//生产环境 前端Web站IP和端口
7 7
 
8 8
 };

+ 19 - 4
WeChat/content/company.html

@@ -59,15 +59,15 @@
59 59
 						<span class="text_posi">当前</span>
60 60
 					</li>
61 61
 				</ul>-->
62
-				<!--<ul class="mui-table-view mui-table-view-chevron">
62
+				<ul class="mui-table-view mui-table-view-chevron" style="margin-top: 50px;">
63 63
 					<li class="mui-table-view-cell mui-media">
64
-						<a class="mui-navigate-right">
64
+						<a class="mui-navigate-right" id="quit">
65 65
 							<div class="mui-media-body">
66
-								<h5 class="text_h_3">修改密码</h5>
66
+								<h5 class="text_h_3">退出登录</h5>
67 67
 							</div>
68 68
 						</a>
69 69
 					</li>
70
-				</ul>-->
70
+				</ul>
71 71
 			</div>
72 72
 		</div>
73 73
 	</body>
@@ -76,4 +76,19 @@
76 76
 	<script src="../Script/Common/huayi.config.js"></script>
77 77
 	<script src="../Script/Common/huayi.http.js"></script>
78 78
 	<script src="js/company.js"></script>
79
+	<script>
80
+		$("#quit").click(function() {
81
+			//点击图片后发送跳转到指定页面的事件。
82
+			var btnArray = ['否', '是'];
83
+			mui.confirm('确定返回?', '提示', btnArray, function(f) {
84
+				if(f.index == 1) {
85
+					helper.cookies.set("openid", "", -1);
86
+					window.location.href = "../login.html";
87
+				} else {
88
+					mui.toast("取消");
89
+				}
90
+			})
91
+
92
+		})
93
+	</script>
79 94
 </html>

+ 0 - 1
WeChat/content/css/personal.css

@@ -9,7 +9,6 @@
9 9
 }
10 10
 .mui-pull-left h4 {
11 11
     font-size: 13px;
12
-    margin-bottom: 5px;
13 12
 }
14 13
 .mui-pull-left h5 {
15 14
     font-size: 12px;

+ 16 - 15
WeChat/content/finance.html

@@ -30,7 +30,7 @@
30 30
 					<li class="mui-table-view-cell mui-media mui-col-xs-12 mui-col-sm-12 Managment">
31 31
 						<a>
32 32
 							<div class="mui-text-left mui-pull-left">
33
-								<h4>本月财务情况:<span id="monthState"></span></h4>
33
+								<h4>本月财务情况111:<span id="monthState"></span></h4>
34 34
 							</div>
35 35
 						</a>
36 36
 					</li>
@@ -40,7 +40,7 @@
40 40
 						<a>
41 41
 							<div class="mui-text-left mui-pull-left">
42 42
 								<h5>本年收入</h5>
43
-								<h3 id="annualIncome">2812218.04</h3>
43
+								<h3 id="annualIncome"></h3>
44 44
 							</div>
45 45
 						</a>
46 46
 					</li>
@@ -48,7 +48,7 @@
48 48
 						<a>
49 49
 							<div class="mui-text-left mui-pull-right">
50 50
 								<h5 style="text-align: right;">本年利润</h5>
51
-								<h3 style="text-align: right;" id="asnnualProfit">2812.04</h3>
51
+								<h3 style="text-align: right;" id="asnnualProfit"></h3>
52 52
 							</div>
53 53
 						</a>
54 54
 					</li>
@@ -56,7 +56,7 @@
56 56
 						<a>
57 57
 							<div class="mui-text-left mui-pull-left">
58 58
 								<h5>本年费用</h5>
59
-								<h4 id="annualCost">0.00</h4>
59
+								<h4 id="annualCost"></h4>
60 60
 							</div>
61 61
 						</a>
62 62
 					</li>
@@ -64,7 +64,7 @@
64 64
 						<a>
65 65
 							<div class="mui-text-left mui-pull-left">
66 66
 								<h5>本季费用</h5>
67
-								<h4 id="quarterlyCost">28.04</h4>
67
+								<h4 id="quarterlyCost"></h4>
68 68
 							</div>
69 69
 						</a>
70 70
 					</li>
@@ -72,7 +72,7 @@
72 72
 						<a>
73 73
 							<div class="mui-text-left mui-pull-left">
74 74
 								<h4>本年人数/工资</h4>
75
-								<h5 id="annualWages">85412.00</h5>
75
+								<h5 id="annualWages"></h5>
76 76
 							</div>
77 77
 						</a>
78 78
 					</li>
@@ -80,7 +80,7 @@
80 80
 						<a>
81 81
 							<div class="mui-text-left mui-pull-left">
82 82
 								<h4>本季人数/工资</h4>
83
-								<h5 id="quarterlyWages">62/6241122.00</h5>
83
+								<h5 id="quarterlyWages"></h5>
84 84
 							</div>
85 85
 						</a>
86 86
 					</li>
@@ -88,7 +88,7 @@
88 88
 						<a>
89 89
 							<div class="mui-text-left mui-pull-left">
90 90
 								<h4>本季收入</h4>
91
-								<h5 id="quarterlyIncome">902030</h5>
91
+								<h5 id="quarterlyIncome"></h5>
92 92
 							</div>
93 93
 						</a>
94 94
 					</li>
@@ -105,7 +105,7 @@
105 105
 						<a>
106 106
 							<div class="mui-text-left mui-pull-left">
107 107
 								<h4>增值税</h4>
108
-								<h5 id="qpvat">0.00</h5>
108
+								<h5 id="qpvat"></h5>
109 109
 							</div>
110 110
 						</a>
111 111
 					</li>
@@ -113,7 +113,7 @@
113 113
 						<a>
114 114
 							<div class="mui-text-left mui-pull-left">
115 115
 								<h4>附加税</h4>
116
-								<h5 id="qpsurtax">28.14</h5>
116
+								<h5 id="qpsurtax"></h5>
117 117
 							</div>
118 118
 						</a>
119 119
 					</li>
@@ -121,7 +121,7 @@
121 121
 						<a>
122 122
 							<div class="mui-text-left mui-pull-left">
123 123
 								<h4>企业所得税</h4>
124
-								<h5 id="qptaxes">稳健理财</h5>
124
+								<h5 id="qptaxes"></h5>
125 125
 							</div>
126 126
 						</a>
127 127
 					</li>
@@ -129,7 +129,7 @@
129 129
 						<a>
130 130
 							<div class="mui-text-left mui-pull-left">
131 131
 								<h4>文化事业建设税</h4>
132
-								<h5 id="qpconTax">10元试试</h5>
132
+								<h5 id="qpconTax"></h5>
133 133
 							</div>
134 134
 						</a>
135 135
 					</li>
@@ -137,7 +137,7 @@
137 137
 						<a>
138 138
 							<div class="mui-text-left mui-pull-left">
139 139
 								<h4>个税</h4>
140
-								<h5 id="qpperinTax">买入0费率</h5>
140
+								<h5 id="qpperinTax"></h5>
141 141
 							</div>
142 142
 						</a>
143 143
 					</li>
@@ -145,7 +145,7 @@
145 145
 						<a>
146 146
 							<div class="mui-text-left mui-pull-left">
147 147
 								<h4>印花税</h4>
148
-								<h5 id="qpstampTax">10元试试</h5>
148
+								<h5 id="qpstampTax"></h5>
149 149
 							</div>
150 150
 						</a>
151 151
 					</li>
@@ -153,13 +153,14 @@
153 153
 						<a>
154 154
 							<div class="mui-text-left mui-pull-left">
155 155
 								<h4>其他税额</h4>
156
-								<h5 id="qpotherTax">605102.00</h5>
156
+								<h5 id="qpotherTax"></h5>
157 157
 							</div>
158 158
 						</a>
159 159
 					</li>
160 160
 				</ul>
161 161
 			</div>
162 162
 		</div>
163
+		<div class="openid"></div>
163 164
 	</body>
164 165
 	<script src="../js/mui.min.js"></script>
165 166
 	<script src="../js/jquery.min.js"></script>

+ 4 - 2
WeChat/content/js/finance.js

@@ -1,19 +1,21 @@
1 1
 mui.init({})
2 2
 var openid = helper.cookies.get("openid");
3
+
3 4
 Ajax();
4 5
 function Ajax() {
6
+	$(".openid").text(openid)
5 7
 	//$(".order").remove();
6 8
 	$.ajax({
7 9
 		url: huayi.config.callcenter_url + 'WxLogin/GetFinc',
8 10
 		data: {
9 11
 			openid: openid, //微信openid,
10
-			//openid: 'oXF5e1mWpX5DajW5_yjNLPKb8ThE',
12
+			openid: 'oXF5e1mWpX5DajW5_yjNLPKb8ThE',
11 13
 		},
12 14
 		async: true,
13 15
 		dataType: 'json',
14 16
 		type: 'get', //HTTP请求类型
15 17
 		success: function(data) {
16
-			var result=data.data;
18
+			var result=data.data; 
17 19
 			var path;
18 20
 			if (result.F_CompanyLogo=="") {
19 21
 				part="../img/headPhoto.png";

+ 9 - 3
WeChat/content/js/indexDetail.js

@@ -16,12 +16,18 @@ function Ajax() {
16 16
 			if(data.state.toLowerCase() == "success") {
17 17
 				var result = data.data
18 18
 				$("#busName").text(result.F_BusName); //类型
19
-				$("#busContent").text(result.F_BusContent); //详情
19
+				var BusContent=decodeURIComponent(result.F_BusContent);
20
+				BusContent = BusContent.replace(/(\n)/g, "");  
21
+				BusContent = BusContent.replace(/(\t)/g, "");  
22
+				BusContent = BusContent.replace(/(\r)/g, "");  
23
+				BusContent = BusContent.replace(/<\/?[^>]*>/g, "");  
24
+				BusContent = BusContent.replace(/\s*/g, "");
25
+				$("#busContent").text(BusContent); //详情
20 26
 				var reMark
21 27
 				if (result.F_Remark=="") {
22 28
 					reMark="没有备注信息"
23 29
 				}else{
24
-					reMark=result.F_Remark
30
+					reMark=result.F_Remark;
25 31
 				}
26 32
 				$("#remark").text(reMark); //备注
27 33
 				//$("#Work_areaname").attr('data-index',result.IsAdminSend);
@@ -31,4 +37,4 @@ function Ajax() {
31 37
 			//异常处理;
32 38
 		}
33 39
 	})
34
-}
40
+}

+ 4 - 2
WeChat/css/login.css

@@ -44,10 +44,12 @@ body {
44 44
 }
45 45
 .oauth-area .reg_href{
46 46
 	text-align: center; 
47
-	display: block; 
48
-	width: 100%; 
49 47
 	float: left;
50 48
 	color: #1d8afa;
51 49
 	font-size: 12px;
50
+	width: 50%;
51
+}
52
+.company{
53
+	display: none;
52 54
 }
53 55
 

+ 9 - 10
WeChat/index.html

@@ -11,12 +11,12 @@
11 11
 
12 12
 	<body>
13 13
 		<script src="js/zepto.js"></script>
14
+		<script src="js/jquery.min.js"></script>
14 15
 		<script src="Script/Common/huayi.config.js"></script>
15 16
 		<script src="Script/Common/huayi.http.js"></script>
16 17
 		<script type="text/javascript">
17
-			//var openid = helper.cookies.get("openid");
18
-			var openid = 'oXF5e1mWpX5DajW5_yjNLPKb8ThE';
19
-			
18
+			var openid = helper.cookies.get("openid");
19
+			//var openid = 'oXF5e1mWpX5DajW5_yjNLPKb8ThE';
20 20
 			var code = helper.request.queryString("code");
21 21
 			var menucode = helper.request.queryString("menucode");
22 22
 			if(!openid) {
@@ -29,17 +29,16 @@
29 29
 					dataType: 'json',
30 30
 					success: function(result) {
31 31
 						if(result.state.toLowerCase() == "success") {
32
-							helper.cookies.set("openid", result.data.openid, 7);
33
-							helper.cookies.set("usercode", result.data.usercode, 7);//1接待部(客服端) 2受理人  3用户端
34
-							gourl();
32
+							var openid=result.data.openid;
33
+							window.location.replace("login.html?menuCode="+menucode+'&openid='+openid);
35 34
 						}
36 35
 					}
37 36
 				});
38
-			} else {
39
-				gourl()
37
+			}else {
38
+				gourl();
39
+				
40 40
 			}
41
-			
42
-			function gourl() {
41
+			function gourl(){
43 42
 				switch(menucode) {
44 43
 					case "WYKP":
45 44
 						window.location.replace("content/AddInvoice.html");

+ 89 - 14
WeChat/login.html

@@ -9,6 +9,7 @@
9 9
 		<link href="css/login.css" rel="stylesheet" />
10 10
 		<script src="js/jquery.min.js"></script>
11 11
 		<script src="Script/Common/huayi.http.js"></script>
12
+		<script src="Script/Common/huayi.config.js"></script>
12 13
 	</head>
13 14
 	<body>
14 15
 		<div class="mui-content">
@@ -30,16 +31,31 @@
30 31
 			<div class="mui-content-padded">
31 32
 				<button id='login' class="mui-btn mui-btn-block mui-btn-primary" style="font-size: 16px;">登录</button>
32 33
 			</div>
33
-			<div class="mui-content-padded oauth-area">
34
+			<div class="mui-content-padded oauth-area" style="width: 100%;">
35
+				<a class="reg_href staff">员工登录</a>
36
+				<a class="reg_href company">公司登陆</a>
34 37
 				<a class="reg_href" href="tel:13828172679">我要合作</a>
35 38
 			</div>
36 39
 		</div>
37 40
 		<script src="js/mui.min.js"></script>
38
-		<script src="Script/Common/huayi.config.js"></script>
41
+		
39 42
 		<script>
40
-			var openid = helper.cookies.get("openid");
41
-//			var type = helper.request.queryString("type");
43
+			//var openid = helper.cookies.get("openid");
44
+			var menucode = helper.request.queryString("menuCode");
45
+			var code = helper.request.queryString("code");
46
+			var openid = helper.request.queryString("openid");
47
+			var typeUser=5;
42 48
 			//登陆验证
49
+			$(".staff").on('tap', function() {
50
+				$(this).hide();
51
+				$(".company").show();
52
+				typeUser=1; //员工
53
+			});
54
+			$(".company").on('tap', function() {
55
+				$(this).hide();
56
+				$(".staff").show();
57
+				typeUser=5; //公司
58
+			});
43 59
 			$("#login").on('tap', function() {
44 60
 				if(!$("#account").val()) {
45 61
 					mui.alert("请输入账号");
@@ -49,6 +65,10 @@
49 65
 					mui.alert("密码不能为空")
50 66
 					return;
51 67
 				}
68
+				debugger
69
+				login();
70
+			})
71
+			function login () {
52 72
 				//请求
53 73
 				$.ajax({
54 74
 					type: "post",
@@ -58,26 +78,81 @@
58 78
 					data: {
59 79
 						UserCode: $("#account").val(),
60 80
 						Password: $("#password").val(),
81
+						UserType:typeUser, 
61 82
 						openid: openid,
62
-						openid: 'oXF5e1mWpX5DajW5_yjNLPKb8ThE', //微信openid 测试用
83
+						//openid: 'oXF5e1mWpX5DajW5_yjNLPKb8ThE', //微信openid 测试用
63 84
 					},
64 85
 					success: function(data) {
65 86
 						debugger
66 87
 						if(data.state == "success") {
67
-							var UserType = data.data.usertype;
68
-							var UserCode = data.data.usercode;
69
-							UserWord = $("#password").val();
70
-							var UserCode = data.data.usercode;
71
-							helper.cookies.set("usercode", UserCode, 7);
72
-							helper.cookies.set("usertype", UserType, 7);
73
-							helper.cookies.set("userword", UserWord, 7);
88
+							helper.cookies.set("openid", openid, 7);
89
+							if (menucode) {
90
+								if (typeUser=="5") {
91
+									gourl();
92
+								} else if(typeUser=="1"){
93
+									gourlStaff();
94
+								}
95
+							} else{
96
+								window.location.href = "content/company.html";
97
+							}
98
+							
74 99
 						} else {
75 100
 							mui.alert(data.message);
76 101
 						}
77 102
 					}
78 103
 				})
79
-
80
-			})
104
+			}
105
+			function gourl() {
106
+				switch(menucode) {
107
+					case "WYKP":
108
+						window.location.replace("content/AddInvoice.html");
109
+						break; //我要开票
110
+					case "WDGS":
111
+						window.location.replace("content/company.html");
112
+						break; //我的公司
113
+					case "WDCW":
114
+						window.location.replace("content/finance.html");
115
+						break; //我的财务
116
+					case "XXCL":
117
+						window.location.replace("content/personal.html");
118
+						break; //首页
119
+					case "FWJL":
120
+						window.location.replace("content/invoiceList.html");
121
+						break; //服务记录
122
+					case "GDLB":
123
+						window.location.replace("content/orderList.html");
124
+						break; //工单列表
125
+					default:
126
+						window.location.replace("error.html");
127
+						break;
128
+				}
129
+			}
130
+			function gourlStaff() {
131
+				switch(menucode) {
132
+					case "WYKP":
133
+						window.location.replace("content/AddInvoice.html");
134
+						break; //我要开票
135
+					case "WDGS":
136
+						window.location.replace("content/personal.html");
137
+						break; //我的公司
138
+					case "WDCW":
139
+						window.location.replace("content/personal.html");
140
+						break; //我的财务
141
+					case "XXCL":
142
+						window.location.replace("content/personal.html");
143
+						break; //首页
144
+					case "FWJL":
145
+						window.location.replace("content/invoiceList.html");
146
+						break; //服务记录
147
+					case "GDLB":
148
+						window.location.replace("content/orderList.html");
149
+						break; //工单列表
150
+					default:
151
+						window.location.replace("error.html");
152
+						break;
153
+				}
154
+			}
155
+			
81 156
 		</script>
82 157
 	</body>
83 158