Explorar el Código

三元微信,修改

miaofuhao %!s(int64=6) %!d(string=hace) años
padre
commit
73731d5402

+ 114 - 5
WeChat/content/js/orderDetail.js

@@ -1,11 +1,110 @@
1 1
 mui.init({})
2 2
 var id = helper.request.queryString("id");
3
+var state = helper.request.queryString("type");
3 4
 var openid = helper.cookies.get("openid");
4 5
 function formatterDealDetail(val, row) {
5 6
 	return str;
6 7
 }
8
+$(function () {
9
+	Ajax();
10
+	if (state=="1") {
11
+		$(".dispose1").show();
12
+	} else if(state=="2"){
13
+		$(".dispose2").show();
14
+	} else if(state=="3"){
15
+		$(".dispose3").show();
16
+	}
17
+	//返回列表
18
+	$('.return').on('tap', function() {
19
+		if (state==1) {
20
+			window.location.href = "orderList.html?Itype=" + state;
21
+		}if (state==2) {
22
+			window.location.href = "orderList.html?Itype=" + state;
23
+		} else if (state==3){
24
+			window.location.href = "orderList.html?Itype=" + state;
25
+		}
26
+		//window.location.href = "client_index.html?Itype=" + itype;
27
+
28
+	});
29
+})
30
+//接单
31
+$(".redeploy").click(function(){
32
+	var btnArray = ['否', '是'];
33
+	mui.confirm('确定接单?', '提示', btnArray, function(f) {
34
+		if(f.index == 1) {
35
+			$.ajax({
36
+				type: "post",
37
+				dataType: 'json',
38
+				url: huayi.config.callcenter_url + '/WxLogin/SureWorkOrder',
39
+				async: true,
40
+				data: {
41
+					orderid: id, //否	strubg	工单编号
42
+					openid: openid, //微信openid 测试用
43
+				},
44
+				success: function(data) {
45
+					if(data.state == "success") {
46
+						debugger
47
+						mui.toast('接单成功');
48
+						window.location.href = "orderList.html?Itype=1";
49
+					} else {
50
+						mui.toast(data.message);
51
+					}
52
+				}
53
+			});
54
+		} else {
55
+			mui.toast("取消");
56
+		}
57
+	})
58
+})
59
+//处理
60
+$(".deal").click(function(){   
61
+    $(".pop_up_bj").fadeIn();
62
+    $(".pop_up_div4").fadeIn();
63
+})
64
+$(".pop_up_bj" ).click(function(){   
65
+    $(".pop_up_bj").hide();
66
+    $(".pop_up_div4").hide();
67
+})
68
+$(".pop_up_div4 .btn .fl" ).click(function(){   
69
+    $(".pop_up_bj").hide();
70
+    $(".pop_up_div4").hide();
71
+    mui.alert("取消");
72
+})
73
+$(".pop_up_div4 .btn .fr" ).click(function(){ 
74
+//				$("#cont").text("");
75
+    $(".pop_up_bj").hide();
76
+    $(".pop_up_div4").hide();
77
+    if($(".textcont_deal").val()=="") {
78
+		mui.alert("请输入处理内容");
79
+	}else{
80
+		$(".pop_up_bj").hide();
81
+    	$(".pop_up_div4").hide();
82
+    	$.ajax({
83
+			type: "post",
84
+			dataType: 'json',
85
+			url: huayi.config.callcenter_url + '/WxLogin/DealWorkOrder',
86
+			async: true,
87
+			data: {
88
+				orderid: id, //否	strubg	工单编号
89
+				isend: 1, //否	int	你看一下前端是什么参数
90
+				cont: $("#textcont_deal").val(), //否	int	处理内容
91
+				openid: openid, //微信openid,
92
+			},
93
+			success: function(data) {
94
+				if(data.state == "success") {
95
+					debugger
96
+					mui.toast('处理成功');
97
+					
98
+					window.location.href = "orderList.html?Itype=2";
99
+				} else {
100
+					mui.toast(data.message);
101
+				}
102
+			}
103
+		});
104
+	}
105
+		
106
+})
7 107
 
8
-Ajax();
9 108
 function Ajax() {
10 109
 	$.ajax({
11 110
 		url: huayi.config.callcenter_url + '/WxLogin/GetWoInfo',
@@ -22,18 +121,28 @@ function Ajax() {
22 121
 				var result = data.data.data[0]
23 122
 				var stateText
24 123
 				if (result.State==0) {
25
-					stateText="待指派"
26
-				}else if (result.State==1) {
27 124
 					stateText="进行中"
28
-				}else if(result.State==2){
125
+				}else if(result.State==1){
126
+					stateText="已完成"
127
+				}if(result.State==2){
29 128
 					stateText="已完成"
30 129
 				}
130
+				console.log(result.State);
31 131
 				$("#workOrderID").text(result.WorkOrderID); //工单编号
32 132
 				$("#gdlxName").text(result.GDLXName); //工单类型
33 133
 				$("#gdlyName").text(result.GDLYName); //工单来源
34 134
 				$("#state").text(stateText); //工单状态
35 135
 				$("#customer").text(result.Customer); //客户姓名
36
-				$("#customerTel").text(result.CustomerTel); //客户电话
136
+				if (state==3) {
137
+					var str="";
138
+					var val1 = result.CustomerTel.substring(0, 3);
139
+					var val2 = result.CustomerTel.substr(-4);
140
+					str = val1 + '****' + val2;
141
+					$("#customerTel").text(str); //客户电话
142
+				}else{
143
+					$("#customerTel").text(result.CustomerTel); //客户电话
144
+				}
145
+				
37 146
 				$("#state").text(stateText); //工单状态
38 147
 				$("#ywlxName").text(result.YWLXName); //业务类型
39 148
 				$("#detail").text(result.Detail); //工单内容

+ 79 - 4
WeChat/content/js/orderList.js

@@ -1,13 +1,86 @@
1 1
 mui.init({})
2
-Ajax();
2
+var state=1;
3 3
 var openid = helper.cookies.get("openid");
4
+var Itype = helper.request.queryString("Itype");
5
+$(function () {
6
+	if (Itype=="1") {
7
+		$(".titdyna li").removeClass("tab_color");
8
+		$(".titdyna li:eq(0)").addClass("tab_color");
9
+		state=1
10
+		Ajax();
11
+	}else if(Itype=="2"){
12
+		$(".titdyna li").removeClass("tab_color");
13
+		$(".titdyna li:eq(1)").addClass("tab_color");
14
+		state=2
15
+		Ajax();
16
+	}else if(Itype=="3"){
17
+		state=3
18
+		$(".titdyna li").removeClass("tab_color");
19
+		$(".titdyna li:eq(2)").addClass("tab_color");
20
+		Ajax();
21
+	}else{
22
+		Ajax();
23
+	}
24
+})
25
+$(".titdyna ul li").click(function () {
26
+	$(".titdyna li").removeClass("tab_color");
27
+	$(this).addClass("tab_color");
28
+	state=$(this).attr('data-index');
29
+	$.ajax({
30
+		url: huayi.config.callcenter_url + 'WxLogin/GetWoList',
31
+		data: {
32
+			openid: openid, //微信openid,
33
+			states:state,
34
+			//openid: 'oXF5e1mWpX5DajW5_yjNLPKb8ThE',
35
+		},
36
+		async: true,
37
+		dataType: 'json',
38
+		type: 'get', //HTTP请求类型
39
+		success: function(data) {
40
+			$("#OA_task").empty();
41
+			if(data.rows && data.rows.length > 0) {
42
+				$(".noinfor").text("");
43
+				$(data.rows).each(function(i, n) {
44
+					var stateText
45
+					if (n.State==0) {
46
+						stateText="待指派"
47
+					}else if (n.State==1) {
48
+						stateText="进行中"
49
+					}else if(n.State==2){
50
+						stateText="已完成"
51
+					}
52
+					$('<li class="mui-table-view-cell order" data-index="' + n.WorkOrderID + '">' +
53
+						'<div class="mui-table">' +
54
+						'<div class="mui-table-cell mui-col-xs-10">' +
55
+						'<h4 class="mui-ellipsis">' + n.Customer +
56
+						'</h4><h5>' + n.CreateTime +
57
+						'</h5></div>'+
58
+						'<div class="mui-table-cell mui-col-xs-2 mui-text-right">'+
59
+						'<span class="mui-h5">'+stateText+
60
+						'</span></div></div></li>').appendTo('#OA_task');
61
+				});
62
+				//工单跳转
63
+				$('.order').on('tap', function() {
64
+					
65
+					var index = $(this).attr('data-index');
66
+					window.location.href = "orderDetail.html?id="  + index+'&type='+state;
67
+				});
68
+			} else {
69
+				$(".noinfor").text("暂无信息");
70
+			}
71
+		},
72
+		error: function(xhr, type, errorThrown) {
73
+			//异常处理;
74
+		}
75
+	})
76
+})
4 77
 function Ajax() {
5 78
 	//$(".order").remove();
6
-
7 79
 	$.ajax({
8 80
 		url: huayi.config.callcenter_url + 'WxLogin/GetWoList',
9 81
 		data: {
10 82
 			openid: openid, //微信openid,
83
+			states:state
11 84
 			//openid: 'oXF5e1mWpX5DajW5_yjNLPKb8ThE',
12 85
 		},
13 86
 		async: true,
@@ -15,8 +88,9 @@ function Ajax() {
15 88
 		type: 'get', //HTTP请求类型
16 89
 		success: function(data) {
17 90
 			if(data.rows && data.rows.length > 0) {
91
+				$(".noinfor").text("");
92
+				$("#OA_task").empty();
18 93
 				$(data.rows).each(function(i, n) {
19
-					console.log(n.Customer);
20 94
 					var stateText
21 95
 					if (n.State==0) {
22 96
 						stateText="待指派"
@@ -38,7 +112,8 @@ function Ajax() {
38 112
 				//工单跳转
39 113
 				$('.order').on('tap', function() {
40 114
 					var index = $(this).attr('data-index');
41
-					window.location.href = "orderDetail.html?id=" + index;
115
+					
116
+					window.location.href = "orderDetail.html?id=" + index+'&type='+state;
42 117
 				});
43 118
 			} else {
44 119
 				$(".noinfor").text("暂无信息");

+ 142 - 17
WeChat/content/orderDetail.html

@@ -12,9 +12,100 @@
12 12
 		<link href="../css/iconfont.css" rel="stylesheet" />
13 13
 		<link href="css/serveDetail.css" rel="stylesheet" />
14 14
 	</head>
15
+	<style>
16
+		
17
+		#GDgz{
18
+			background: #FFFFFF;
19
+		}
20
+		.mui_btn1{display: none;}
21
+		.mui_btn1_tit{
22
+			padding: 10px 0 0 10px;
23
+			font-size: 14px;
24
+		}
25
+		.mui_btn1{
26
+			overflow: hidden;
27
+		}
28
+		.mui_btn1 li{
29
+			float: left;
30
+			margin: 10px 4% 0 4%;
31
+		}
32
+		.mui-btn-block{
33
+			padding: 5px 10px;
34
+			font-size: 14px;
35
+		}
36
+		.pop_up_bj{
37
+			top: 0px;
38
+			background: #000000;
39
+			filter:alpha(opacity=50);   
40
+		  	-moz-opacity:0.5;   
41
+		  	-khtml-opacity: 0.5;   
42
+		  	opacity: 0.5;
43
+		  	position: fixed;
44
+		  	z-index: 333;
45
+		  	width: 100%;
46
+		  	height: 100%;
47
+		  	display: none;   
48
+		}
49
+		/*弹框4*/
50
+		.pop_up_div4{
51
+			margin: auto;  
52
+		  	position: fixed;  
53
+		  	top: 0; 
54
+		  	left: 0; 
55
+		  	bottom: 0; 
56
+		  	right: 0;
57
+		  	width: 80%;
58
+		  	height:185px;
59
+		  	background: #FFFFFF;
60
+		  	z-index: 334;
61
+		  	-moz-border-radius: 5px; /* Firefox */
62
+		  	-webkit-border-radius: 5px; /* Safari 和 Chrome */
63
+		  	border-radius: 5px; /* Opera 10.5+, 以及使用了IE-CSS3的IE浏览器 */
64
+		  	display: none; 
65
+		  	
66
+		}
67
+		.pop_up_div4 .tit{
68
+			width: 100%;
69
+			line-height: 44px;
70
+			height: 44px;
71
+			text-align: center;
72
+			font-size: 13px;
73
+			color: #666666;
74
+		}
75
+		.pop_up_div4 .contain{
76
+			width: 90%;
77
+			margin: 0 auto;
78
+		}
79
+		.pop_up_div4 .contain textarea{
80
+			width:100%;
81
+			height: 102px;
82
+			background: #f5f5f6;
83
+			text-indent: 2em;
84
+			font-size: 12px;
85
+			padding: 5px;
86
+			line-height: 20px;
87
+			margin: 0;
88
+			border: none;
89
+		}
90
+		.pop_up_div4 .btn{
91
+			width: 65%;
92
+			margin: 0 auto;
93
+			overflow: hidden;
94
+		}
95
+		.pop_up_div4 .btn button{
96
+			padding:3px 25px !important;
97
+		}
98
+		.pop_up_div4 .btn .fl{
99
+			float: left;
100
+			color: #666666;
101
+		}
102
+		.pop_up_div4 .btn .fr{
103
+			float: right;
104
+		}
105
+	</style>
15 106
 	<body>
16 107
 		<div class="mui-nav">
17
-			<a class="mui-icon mui-icon-arrowleft" href="orderList.html"></a>
108
+			<a class="mui-icon mui-icon-arrowleft return"></a>
18 109
 			工单详情
19 110
 		</div>
20 111
 		<div class="mui-content" style="margin-top: 54px;">
@@ -81,25 +172,59 @@
81 172
 						<p id="detail" ></p>
82 173
 					</div>
83 174
 				</li>
84
-				<div class="mui-table-view work-content ">
85
-					<div class="mui-table-cell mui-col-xs-10">
86
-						<h4 class="mui-ellipsis size-16" style="padding: 6px ;">工单跟踪信息</h4>
87
-					</div>
88
-				</div>
89
-				<!--工单进度-->
90 175
 				
91
-				<div class="mui-padding" style="padding: 6px;" id="GDgz">
92
-					<!--<h5 class="mui-badge-success mui-badge-inverted">时间<h5>
93
-						<span>操作人:</span>
94
-						<span> + Agree</span>
95
-					</h5> 
96
-					<h5>
97
-						<span>备注信息:</span>
98
-						<span class="Font"></span>
99
-					</h5>-->
176
+			</ul>
177
+			<ul class="mui-table-view mui-grid-view">
178
+				<h4 class="mui-ellipsis size-16 mui_btn1_tit">操作按钮:</h4>
179
+				<div class="type1">
180
+					<!--待接单-->
181
+					<div class="mui_btn1 dispose1">
182
+						<li class=" mui-media mui-col-xs-3">
183
+							<button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block redeploy">接单</button>
184
+						</li>
185
+					</div>
186
+					<!--待处理-->
187
+					<div class="mui_btn1 dispose2">
188
+						<li class=" mui-media mui-col-xs-3">
189
+							<button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block deal">处理</button>
190
+						</li>
191
+					</div>
192
+					<!--已完成-->
193
+					<div class="mui_btn1 dispose3">
194
+						<!--<li class=" mui-media mui-col-xs-3">
195
+							<button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block edit">修改</button>
196
+						</li>-->
197
+					</div>
100 198
 				</div>
101 199
 			</ul>
102
-			
200
+			<div class="mui-table-view work-content ">
201
+				<div class="mui-table-cell mui-col-xs-10">
202
+					<h4 class="mui-ellipsis size-16" style="padding: 6px ;">工单跟踪信息</h4>
203
+				</div>
204
+			</div>
205
+			<!--工单进度-->
206
+			<div class="mui-padding" style="padding: 6px;" id="GDgz">
207
+				<!--<h5 class="mui-badge-success mui-badge-inverted">时间<h5>
208
+					<span>操作人:</span>
209
+					<span> + Agree</span>
210
+				</h5> 
211
+				<h5>
212
+					<span>备注信息:</span>
213
+					<span class="Font"></span>
214
+				</h5>-->
215
+			</div>
216
+		</div>
217
+		<div class="pop_up_bj"></div>
218
+		<!--弹框4-->
219
+		<div class="pop_up_div4">
220
+			<div class="tit">请输入处理内容</div>
221
+			<div class="contain">
222
+				<textarea class="textcont_deal"></textarea>
223
+			</div>
224
+			<div class="btn">
225
+				<button type="button" data-loading-text="提交中" class="mui-btn mui-btn-royal fl">取消</button>
226
+				<button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary fr">确定</button>
227
+			</div>
103 228
 		</div>
104 229
 		<script src="../js/mui.min.js?"></script>
105 230
 		<script src="../js/mui.picker.js"></script>

+ 45 - 2
WeChat/content/orderList.html

@@ -9,12 +9,54 @@
9 9
 		<link rel="stylesheet" href="../css/mui.css">
10 10
 		<link rel="stylesheet" href="../css/iconfont.css" />
11 11
 		<link rel="stylesheet" href="css/serve.css" />
12
+		<style>
13
+			/*头部*/
14
+
15
+			/*动态*/
16
+			.titdyna{
17
+				position: fixed;
18
+				width: 100%;
19
+				top: 0px;
20
+				background: #FFFFFF;
21
+			}
22
+			.titdyna ul{
23
+				padding: 0;
24
+				margin: 0;
25
+				overflow: hidden;
26
+			}
27
+			.titdyna ul li{
28
+				display: block;
29
+				width: 33%;
30
+				float: left;
31
+				text-align: center;
32
+				height: 38px;
33
+				line-height: 38px;
34
+				color: #929292;
35
+			}
36
+			.tab_color{color: #2cc6a7 !important;}
37
+			#OA_task{
38
+				margin-top: 46px;
39
+			}
40
+			
41
+		</style>
12 42
 	</head>
13 43
 	<body>
14 44
 		<!--页面主内容区开始-->
15 45
 		<div class="mui-content">
16
-			<div class="mui-content">
17
-		    <ul id="OA_task" class="mui-table-view mui-table-view-striped mui-table-view-condensed">
46
+			<div class="titdyna">
47
+				<ul>
48
+					<li class="tab_color" data-index="1">
49
+						待接单
50
+					</li>
51
+					<li data-index="2">
52
+						待处理
53
+					</li>
54
+					<li data-index="3">
55
+						已完成
56
+					</li>
57
+				</ul>
58
+			</div>
59
+ 		    <ul id="OA_task" class="mui-table-view mui-table-view-striped mui-table-view-condensed">
18 60
 		        <!--<li class="mui-table-view-cell">
19 61
 		            <div class="mui-table">
20 62
 		                <div class="mui-table-cell mui-col-xs-10">
@@ -27,6 +69,7 @@
27 69
 		            </div>
28 70
 		        </li>-->
29 71
 		    </ul>
72
+		    <div class="noinfor" style="text-align: center; font-size: 16px;">
30 73
 		</div>
31 74
 	</body>
32 75
 	<script src="../js/mui.min.js"></script>