Przeglądaj źródła

微信添带出 物料 客户

jinquanwu 6 lat temu
rodzic
commit
783528c9de

+ 23 - 23
WeChat/client-side/AddWorkolder.html

@@ -32,7 +32,7 @@
32 32
 					<div class="mui-input-row">
33 33
 						<label class="label">工单来源:</label>
34 34
 						<input type="text" id='order_source' class="ui-alert type_con size-14" data-index="2" readonly="readonly" />
35
-						<a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
35
+						<a href="#"><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
36 36
 					</div>
37 37
 				</li>
38 38
 				<li class="mui-table-view-cell mui-table-view-li ">
@@ -76,7 +76,7 @@
76 76
 						<div class="mui-input-row">
77 77
 							<label class="label">问题类别:</label>
78 78
 							<input type="text" id='order_category' class="mui-alert type_con size-14" data-index="" readonly="readonly" />
79
-							<a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
79
+							<a href="#"><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
80 80
 							<!--<input id="order_pro" style="display: none;" data-index=""></input>
81 81
 							<input id="order_floor" style="display: none;" data-index=""></input>
82 82
 							<input id='order_rengValue' style="display: none;" data-index=""/>
@@ -88,7 +88,7 @@
88 88
 						<div class="mui-input-row">
89 89
 							<label class="label">产品名称:</label>
90 90
 							<input type="text" id='order_productname' class="mui-alert type_con size-14" data-index="" readonly="readonly" />
91
-							<a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
91
+							<a href="#"><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
92 92
 							
93 93
 						</div>
94 94
 				    </li>
@@ -108,7 +108,7 @@
108 108
 						<div class="mui-input-row">
109 109
 							<label class="label">销售基地:</label>
110 110
 							<input type="text" id='ower_relationship' class="ui-alert type_con size-14" data-index="" readonly="readonly" placeholder="请选择"/>
111
-							<a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
111
+							<a href="#"><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
112 112
 						</div>
113 113
 				    </li>
114 114
 				    
@@ -120,35 +120,35 @@
120 120
 						<div class="mui-input-row">
121 121
 							<label class="label">产品名称:</label>
122 122
 							<input type="text" id='order_product' class="mui-alert type_con size-14" data-index="" readonly="readonly" />
123
-							<a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
123
+							<a href="#"><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
124 124
 						</div>
125 125
 				    </li>
126 126
 				    <li class="mui-table-view-cell" id="Sales_base">
127 127
 						<div class="mui-input-row">
128 128
 							<label class="label">销售基地:</label>
129 129
 							<input type="text" id='ower_Sales_base' class="ui-alert type_con size-14" data-index="" readonly="readonly" placeholder="请选择"/>
130
-							<a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
130
+							<a href="#"><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
131 131
 						</div>
132 132
 				    </li>
133 133
 				    <li class="mui-table-view-cell" id="quest">
134 134
 						<div class="mui-input-row">
135 135
 							<label class="label">问题类别1:</label>
136 136
 							<input type="text" id='order_cat' class="ui-alert type_con size-14" data-index="" readonly="readonly" placeholder="请选择"/>
137
-							<a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
137
+							<a href="#"><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
138 138
 						</div>
139 139
 				    </li>
140 140
 				    <li class="mui-table-view-cell" id="que">
141 141
 						<div class="mui-input-row">
142 142
 							<label class="label">问题类别2:</label>
143 143
 							<input type="text" id='order_question' class="ui-alert type_con size-14" data-index="" readonly="readonly" placeholder="请选择"/>
144
-							<a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
144
+							<a href="#"><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
145 145
 						</div>
146 146
 				    </li>
147 147
 				    <li class="mui-table-view-cell" id="matter">
148 148
 						<div class="mui-input-row">
149 149
 							<label class="label">问题类别3:</label>
150 150
 							<input type="text" id='order_matter' class="ui-alert type_con size-14" data-index="" readonly="readonly" placeholder="请选择"/>
151
-							<a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
151
+							<a href="#"><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
152 152
 						</div>
153 153
 				    </li>
154 154
 				    <li class="mui-table-view-cell">
@@ -167,7 +167,7 @@
167 167
 						<div class="mui-input-row">
168 168
 							<label class="label">重要级别:</label>
169 169
 							<input type="text" id='order_rank' class="mui-alert type_con size-14" data-index="" readonly="readonly" />
170
-							<a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
170
+							<a href="#"><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
171 171
 						</div>
172 172
 				    </li>
173 173
 				
@@ -188,7 +188,7 @@
188 188
 						<div class="mui-input-row">
189 189
 							<label class="label">问题类别:</label>
190 190
 							<input type="text" id='order_wentlb' class="mui-alert type_con size-14" data-index="" readonly="readonly" />
191
-							<a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
191
+							<a href="#"><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
192 192
 							
193 193
 						</div>
194 194
 				    </li>
@@ -208,7 +208,7 @@
208 208
 						<div class="mui-input-row">
209 209
 							<label class="label">抽检级别:</label>
210 210
 							<input type="text" id='order_samplingle' class="mui-alert type_con size-14" data-index="" readonly="readonly" />
211
-							<a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
211
+							<a href="#"><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
212 212
 							
213 213
 						</div>
214 214
 				    </li>
@@ -216,7 +216,7 @@
216 216
 						<div class="mui-input-row">
217 217
 							<label class="label">抽检单位:</label>
218 218
 							<input type="text" id='order_lingunit' class="mui-alert type_con size-14" data-index="" readonly="readonly" />
219
-							<a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
219
+							<a href="#"><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
220 220
 							
221 221
 						</div>
222 222
 				    </li>
@@ -254,7 +254,7 @@
254 254
 						<div class="mui-input-row">
255 255
 							<label class="label">问题类别:</label>
256 256
 							<input type="text" id='order_texta' class="mui-alert type_con size-14" data-index="" readonly="readonly" />
257
-							<a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
257
+							<a href="#"><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
258 258
 							<!--<input id="order_pro" style="display: none;" data-index=""></input>
259 259
 							<input id="order_floor" style="display: none;" data-index=""></input>
260 260
 							<input id='order_rengValue' style="display: none;" data-index=""/>
@@ -266,7 +266,7 @@
266 266
 						<div class="mui-input-row">
267 267
 							<label class="label">产品名称:</label>
268 268
 							<input type="text" id='order_chpi' class="mui-alert type_con size-14" data-index="" readonly="readonly" />
269
-							<a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
269
+							<a href="#"><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
270 270
 							
271 271
 						</div>
272 272
 				    </li>
@@ -286,7 +286,7 @@
286 286
 						<div class="mui-input-row">
287 287
 							<label class="label">销售基地:</label>
288 288
 							<input type="text" id='ower_showCpke' class="ui-alert type_con size-14" data-index="" readonly="readonly" placeholder="请选择"/>
289
-							<a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
289
+							<a href="#"><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
290 290
 						</div>
291 291
 				    </li>
292 292
 				    
@@ -316,7 +316,7 @@
316 316
 						<div class="mui-input-row">
317 317
 							<label class="label">大区:</label>
318 318
 							<input type="text" id='order_macrocell' class="mui-alert type_con size-14" data-index="" readonly="readonly" />
319
-							<a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
319
+							<a href="#"><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
320 320
 							
321 321
 						</div>
322 322
 					    </li>
@@ -324,7 +324,7 @@
324 324
 							<div class="mui-input-row">
325 325
 								<label class="label">分公司:</label>
326 326
 								<input type="text" id='order_branch' class="mui-alert type_con size-14" data-index="" readonly="readonly" />
327
-								<a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
327
+								<a href="#"><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
328 328
 								
329 329
 							</div>
330 330
 					    </li>
@@ -346,7 +346,7 @@
346 346
 				    	<li class="mui-table-view-cell">
347 347
 							<div class="mui-input-row">
348 348
 								<label class="label">物料名称:</label>
349
-								<input type="number" id="order_mingcheng" placeholder="请输入物料名称" class="size-14">
349
+								<input type="text" id="order_mingcheng" placeholder="请输入物料名称" class="size-14">
350 350
 							</div>
351 351
 				        </li>
352 352
 				        <li class="mui-table-view-cell">
@@ -433,28 +433,28 @@
433 433
 						<div class="mui-input-row">
434 434
 							<label class="label  zaue">省:</label>
435 435
 							<input type="text" id='choworder_rengin' class="mui-alert type_con size-14" data-index="" readonly="readonly" />
436
-							<a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
436
+							<a href="#"><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
437 437
 						</div>
438 438
 				    </li>
439 439
 				    <li class="mui-table-view-cell" id="chowZhuTiPicker">
440 440
 						<div class="mui-input-row">
441 441
 							<label class="label">市:</label>
442 442
 							<input type="text" id='shouorder_shi' class="mui-alert type_con size-14" data-index="" readonly="readonly" />
443
-							<a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
443
+							<a href="#"><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
444 444
 						</div>
445 445
 				   </li>
446 446
 					<li class="mui-table-view-cell" id="chowcounty">
447 447
 						<div class="mui-input-row">
448 448
 							<label class="label">县:</label>
449 449
 							<input type="text" id='chouorder_xian' class="mui-alert type_con size-14" data-index="" readonly="readonly" />
450
-							<a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
450
+							<a href="#"><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
451 451
 						</div>
452 452
 					</li>
453 453
 					<li class="mui-table-view-cell" id="chowtowns">
454 454
 						<div class="mui-input-row">
455 455
 							<label class="label">乡:</label>
456 456
 							<input type="text" id='chouorder_xiang' class="mui-alert type_con size-14" data-index="" readonly="readonly" />
457
-							<a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
457
+							<a href="#"><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
458 458
 						</div>
459 459
 					</li>
460 460
 					<li class="mui-table-view-cell">

+ 2 - 2
WeChat/client-side/editWorkolder.html

@@ -24,7 +24,7 @@
24 24
 	<body>
25 25
 		<div class="mui-nav">
26 26
 			<a class="mui-icon mui-icon-arrowleft" href="Have_list.html"></a>
27
-			创建工单
27
+			修改工单
28 28
 		</div>
29 29
 		<div class="mui-content" style="margin-top: 44px;">
30 30
 			<ul class="mui-table-view">
@@ -346,7 +346,7 @@
346 346
 				    	<li class="mui-table-view-cell">
347 347
 							<div class="mui-input-row">
348 348
 								<label class="label">物料名称:</label>
349
-								<input type="number" id="order_mingcheng" placeholder="请输入物料名称" class="size-14">
349
+								<input type="text" id="order_mingcheng" placeholder="请输入物料名称" class="size-14">
350 350
 							</div>
351 351
 				        </li>
352 352
 				        <li class="mui-table-view-cell">

+ 8 - 2
WeChat/client-side/establish.html

@@ -58,13 +58,19 @@
58 58
 						<input type="number" id="order_phone" placeholder="请输入客户电话" class="size-14">
59 59
 					</div>
60 60
 				</li>
61
-				<li class="mui-table-view-cell" id="trench">
61
+				<li class="mui-table-view-cell">
62
+					<div class="mui-input-row">
63
+						<label class="label">公司名称:</label>
64
+						<input type="text" id="order_tel" placeholder="请输入公司名称" class="size-14">
65
+					</div>
66
+				</li>
67
+				<!--<li class="mui-table-view-cell" id="trench">
62 68
 						<div class="mui-input-row">
63 69
 							<label class="label">渠道类型:</label>
64 70
 							<input type="text" id='manager' class="mui-alert type_con size-14" data-index="" readonly="readonly" />
65 71
 							<a ><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
66 72
 						</div>
67
-				 </li>	
73
+				 </li>	-->
68 74
 				<li class="mui-table-view-cell">
69 75
 					<div class="mui-input-row">
70 76
 						<label class="label">详细地址:</label>

+ 107 - 157
WeChat/client-side/js/AddWorkolder.js

@@ -648,31 +648,31 @@ function village(){
648 648
 		});
649 649
    }
650 650
 
651
-
652
-//		Ajax();
653
-//		function Ajax() {
654
-//				$.ajax({
655
-//					url: huayi.config.callcenter_url + 'WxLogin/GetDpment',
656
-//					data: {
657
-//						OpenId: openid, //微信openid,
658
-//					},
659
-//					async: true,
660
-//					dataType: 'json',
661
-//					type: 'get', //HTTP请求类型
662
-//					success: function(data) {
663
-//						if(data.state.toLowerCase() == "success") {
664
-//							var result = data.data;
665
-//							$("#custo").text(result.F_UserName); 
666
-//							$("#cus").text(result.F_UserCode); 
667
-//			
668
-//						
669
-//						}
670
-//					},
671
-//					error: function(xhr, type, errorThrown) {
672
-//						//异常处理;
673
-//					}
674
-//				})
675
-//			}
651
+   //获取上一级
652
+		Ajax();
653
+		function Ajax() {
654
+				$.ajax({
655
+					url: huayi.config.callcenter_url + 'WxLogin/GetDpment',
656
+					data: {
657
+						OpenId: openid, //微信openid,
658
+					},
659
+					async: true,
660
+					dataType: 'json',
661
+					type: 'get', //HTTP请求类型
662
+					success: function(data) {
663
+						if(data.state.toLowerCase() == "success") {
664
+							var result = data.data;
665
+							$("#custo").text(result.F_UserName); 
666
+							$("#cus").text(result.F_UserCode); 
667
+			
668
+						
669
+						}
670
+					},
671
+					error: function(xhr, type, errorThrown) {
672
+						//异常处理;
673
+					}
674
+				})
675
+			}
676 676
 
677 677
 
678 678
 
@@ -1034,56 +1034,7 @@ function which(){
1034 1034
 	(function($, doc) {
1035 1035
 		$.init();
1036 1036
 		$.ready(function() {
1037
-			
1038
-			
1039
-			
1040
-			//接收部门
1041
-//			var Rickers1 = new $.PopPicker({
1042
-//				layer: 2
1043
-//			});
1044
-//			Rickers1.setData(recccc);
1045
-//			var RCs = doc.getElementById('showUserPicker1');
1046
-//			var sults1 = doc.getElementById('recive_type');
1047
-//			var sults2 = doc.getElementById('recive_type1');
1048
-//			var sults3 = doc.getElementById('recive_type2');
1049
-//			RCs.addEventListener('tap', function(event) {
1050
-//				Rickers1.show(function(items) {
1051
-//					console.log(items)
1052
-//					if(items[1].text == undefined) {
1053
-//						sults1.value = items[0].text;
1054
-//						sults1.setAttribute("data-index", items[0].id);
1055
-//					} else {
1056
-//						sults1.value = items[1].text
1057
-//						sults1.setAttribute("data-index", items[1].id);
1058
-//					}
1059
-//					//RCResults.value =items[0].text + "-" + items[1].text + "-" + items[2].text;
1060
-//					//RCResults.setAttribute("data-index", items[0].id);
1061
-//					//RCResults2.setAttribute("data-index", items[1].id);
1062
-//					//RCResults3.setAttribute("data-index", items[2].id);
1063
-//					//返回 false 可以阻止选择框的关闭
1064
-//					//return false;
1065
-//				});
1066
-//			}, false);
1067
-			//	接收人员
1068
-//			city5 = new $.PopPicker();
1069
-//			var showCityPickerButton5 = doc.getElementById('showCityPicker5');
1070
-//			var cityt5 = doc.getElementById('ower_recive');
1071
-//			showCityPickerButton5.addEventListener('tap', function(event) {
1072
-//				geveUser();
1073
-//				city5.show(function(items) {
1074
-//					if (items[0].text!=undefined) {
1075
-//						cityt5.value = items[0].text;
1076
-//						cityt5.setAttribute("data-index", items[0].value);
1077
-//					}
1078
-//					
1079
-//					//返回 false 可以阻止选择框的关闭
1080
-//					//return false;
1081
-//				});
1082
-//			}, false);
1083
-		
1084
-			
1085
-			
1086
-			
1037
+					
1087 1038
 			
1088 1039
 			//		咨询	省
1089 1040
 			var RCiP = new $.PopPicker({
@@ -1469,88 +1420,87 @@ $('#order_productname').find('input[data-index=""]').on('change', function() {
1469 1420
 
1470 1421
 
1471 1422
 
1472
-//$('#order_coding').blur(function () {
1473
-////             alert($(this).val());
1474
-//			// $('#material').show();
1475
-//		if($(this).val()==''){
1476
-//			 $('#tianxie').show();
1477
-//			 $('#xiangqingm').hide();
1478
-//		}else {
1479
-//			 $('#tianxie').hide();	 
1480
-//			 $('#xiangqingm').show();
1481
-//				
1482
-//		}							
1483
-//	//根据客户编号获取信息
1484
-//
1485
-//		$.ajax({
1486
-//			url: huayi.config.callcenter_url + 'CustomerNew/GetCodeCustomer',
1487
-//			data: {
1488
-//				code:$('#order_coding').val(),
1489
-//				OpenId: openid, //微信openid,
1490
-//			},
1491
-//			async: true,
1492
-//			dataType: 'json',
1493
-//			type: 'get', //HTTP请求类型
1494
-//			success: function(data) {
1495
-//				if(data.state.toLowerCase() == "success") {
1496
-//					var result = data.data;
1497
-//					
1498
-//					$('#yewu').text(result.F_Salesman);
1499
-//					$('#dianhua').text(result.F_SalesPhone);
1500
-//					$('#daqu').text(result.F_AreaName);
1501
-//					$('#fengsi').text(result.F_BranchName);
1502
-//					$('#jyppai').text(result.F_Brands);
1503
-//				}
1504
-//			},
1505
-//			error: function(xhr, type, errorThrown) {
1506
-//				//异常处理;
1507
-//			}
1508
-//		})
1509
-//	
1510
-//});
1423
+$('#order_coding').blur(function () {
1424
+//             alert($(this).val());
1425
+			// $('#material').show();
1426
+		if($(this).val()==''){
1427
+			 $('#tianxie').show();
1428
+			 $('#xiangqingm').hide();
1429
+		}else {
1430
+			 $('#tianxie').hide();	 
1431
+			 $('#xiangqingm').show();
1432
+				
1433
+		}							
1434
+	//根据客户编号获取信息
1435
+		$.ajax({
1436
+			url: huayi.config.callcenter_url + 'CustomerNew/GetCodeCustomer',
1437
+			data: {
1438
+				code:$('#order_coding').val(),
1439
+				OpenId: openid, //微信openid,
1440
+			},
1441
+			async: true,
1442
+			dataType: 'json',
1443
+			type: 'get', //HTTP请求类型
1444
+			success: function(data) {
1445
+				if(data.state.toLowerCase() == "success") {
1446
+					var result = data.data;
1447
+					
1448
+					$('#order_yewuyi').val(result.F_Salesman);
1449
+					$('#order_yewu').val(result.F_SalesPhone);
1450
+					$('#order_macrocell').val(result.F_AreaName);
1451
+					$('#order_branch').val(result.F_BranchName);
1452
+					$('#order_pinpai').val(result.F_Brands);
1453
+				}
1454
+			},
1455
+			error: function(xhr, type, errorThrown) {
1456
+				//异常处理;
1457
+			}
1458
+		})
1459
+	
1460
+});
1461
+
1511 1462
 
1512 1463
 
1464
+$('#order_material').blur(function () {
1465
+//             alert($(this).val());
1466
+			// $('#material').show();
1467
+		if($(this).val()==''){
1468
+			 $('#wuliaotian').show();
1469
+			 $('#wuliao').hide();
1470
+		}else {
1471
+			 $('#wuliaotian').hide();	 
1472
+			 $('#wuliao').show();
1473
+				
1474
+		}							
1475
+	//根据物料编码获取信息
1513 1476
 
1514
-//$('#order_material').blur(function () {
1515
-////             alert($(this).val());
1516
-//			// $('#material').show();
1517
-//		if($(this).val()==''){
1518
-//			 $('#wuliaotian').show();
1519
-//			 $('#wuliao').hide();
1520
-//		}else {
1521
-//			 $('#wuliaotian').hide();	 
1522
-//			 $('#wuliao').show();
1523
-//				
1524
-//		}							
1525
-//	//根据物料编码获取信息
1526
-//
1527
-//		$.ajax({
1528
-//			url: huayi.config.callcenter_url + 'MaterialManage/GetCodeModel',
1529
-//			data: {
1530
-//				code:$('#order_material').val(),
1531
-//				OpenId: openid, //微信openid,
1532
-//			},
1533
-//			async: true,
1534
-//			dataType: 'json',
1535
-//			type: 'get', //HTTP请求类型
1536
-//			success: function(data) {
1537
-//				if(data.state.toLowerCase() == "success") {
1538
-//					var result = data.data;
1539
-//					$("#wname").text(data.model.F_MaterialName);//物料名称
1540
-//					$("#xhao").text(data.model.F_Model),//型号
1541
-//					$("#gge").text(data.model.F_Specs);//规格
1542
-//					$("#yijif").text(data.model.F_Level1);//一级分类
1543
-//					$("#erjif").text(data.model.F_Level2);//二级分类
1544
-//					$("#sanjif").text(data.model.F_Level3);//三级分类
1545
-//					$('#pinp').text(data.model.F_Brand);//品牌
1546
-//					$('#fhffx').text(data.model.F_MaterialEffect); //复合肥肥效
1547
-//					$('#cpxx').text(data.model.F_Pipeline); //产品线tensions
1548
-//					$("#gyii").text(data.model.F_Craft);//工艺
1549
-//				}
1550
-//			},
1551
-//			error: function(xhr, type, errorThrown) {
1552
-//				//异常处理;
1553
-//			}
1554
-//		})
1555
-//	
1556
-//});
1477
+		$.ajax({
1478
+			url: huayi.config.callcenter_url + 'MaterialManage/GetCodeModel',
1479
+			data: {
1480
+				code:$('#order_material').val(),
1481
+				OpenId: openid, //微信openid,
1482
+			},
1483
+			async: true,
1484
+			dataType: 'json',
1485
+			type: 'get', //HTTP请求类型
1486
+			success: function(data) {
1487
+				if(data.state.toLowerCase() == "success") {
1488
+					var result = data.data;
1489
+					$("#order_mingcheng").val(result.model.F_MaterialName);//物料名称
1490
+					$("#order_xinghao").val(result.model.F_Model),//型号
1491
+					$("#order_guige").val(result.model.F_Specs);//规格
1492
+					$("#order_yiji").val(result.model.F_Level1);//一级分类
1493
+					$("#order_erji").val(result.model.F_Level2);//二级分类
1494
+					$("#order_sanji").val(result.model.F_Level3);//三级分类
1495
+					$('#order_pinpa').val(result.model.F_Brand);//品牌
1496
+					$('#order_fuhefei').val(result.model.F_MaterialEffect); //复合肥肥效
1497
+					$('#order_chanpinxian').val(result.model.F_Pipeline); //产品线tensions
1498
+					$("#order_gongyi").val(result.model.F_Craft);//工艺
1499
+				}
1500
+			},
1501
+			error: function(xhr, type, errorThrown) {
1502
+				//异常处理;
1503
+			}
1504
+		})
1505
+	
1506
+});

+ 81 - 82
WeChat/client-side/js/editWorkolder.js

@@ -1569,88 +1569,87 @@ $('#order_productname').find('input[data-index=""]').on('change', function() {
1569 1569
 
1570 1570
 
1571 1571
 
1572
-//$('#order_coding').blur(function () {
1573
-////             alert($(this).val());
1574
-//			// $('#material').show();
1575
-//		if($(this).val()==''){
1576
-//			 $('#tianxie').show();
1577
-//			 $('#xiangqingm').hide();
1578
-//		}else {
1579
-//			 $('#tianxie').hide();	 
1580
-//			 $('#xiangqingm').show();
1581
-//				
1582
-//		}							
1583
-//	//根据客户编号获取信息
1584
-//
1585
-//		$.ajax({
1586
-//			url: huayi.config.callcenter_url + 'CustomerNew/GetCodeCustomer',
1587
-//			data: {
1588
-//				code:$('#order_coding').val(),
1589
-//				OpenId: openid, //微信openid,
1590
-//			},
1591
-//			async: true,
1592
-//			dataType: 'json',
1593
-//			type: 'get', //HTTP请求类型
1594
-//			success: function(data) {
1595
-//				if(data.state.toLowerCase() == "success") {
1596
-//					var result = data.data;
1597
-//					
1598
-//					$('#yewu').text(result.F_Salesman);
1599
-//					$('#dianhua').text(result.F_SalesPhone);
1600
-//					$('#daqu').text(result.F_AreaName);
1601
-//					$('#fengsi').text(result.F_BranchName);
1602
-//					$('#jyppai').text(result.F_Brands);
1603
-//				}
1604
-//			},
1605
-//			error: function(xhr, type, errorThrown) {
1606
-//				//异常处理;
1607
-//			}
1608
-//		})
1609
-//	
1610
-//});
1572
+$('#order_coding').blur(function () {
1573
+//             alert($(this).val());
1574
+			// $('#material').show();
1575
+		if($(this).val()==''){
1576
+			 $('#tianxie').show();
1577
+			 $('#xiangqingm').hide();
1578
+		}else {
1579
+			 $('#tianxie').hide();	 
1580
+			 $('#xiangqingm').show();
1581
+				
1582
+		}							
1583
+	//根据客户编号获取信息
1584
+		$.ajax({
1585
+			url: huayi.config.callcenter_url + 'CustomerNew/GetCodeCustomer',
1586
+			data: {
1587
+				code:$('#order_coding').val(),
1588
+				OpenId: openid, //微信openid,
1589
+			},
1590
+			async: true,
1591
+			dataType: 'json',
1592
+			type: 'get', //HTTP请求类型
1593
+			success: function(data) {
1594
+				if(data.state.toLowerCase() == "success") {
1595
+					var result = data.data;
1596
+					
1597
+					$('#order_yewuyi').val(result.F_Salesman);
1598
+					$('#order_yewu').val(result.F_SalesPhone);
1599
+					$('#order_macrocell').val(result.F_AreaName);
1600
+					$('#order_branch').val(result.F_BranchName);
1601
+					$('#order_pinpai').val(result.F_Brands);
1602
+				}
1603
+			},
1604
+			error: function(xhr, type, errorThrown) {
1605
+				//异常处理;
1606
+			}
1607
+		})
1608
+	
1609
+});
1611 1610
 
1612 1611
 
1613 1612
 
1614
-//$('#order_material').blur(function () {
1615
-////             alert($(this).val());
1616
-//			// $('#material').show();
1617
-//		if($(this).val()==''){
1618
-//			 $('#wuliaotian').show();
1619
-//			 $('#wuliao').hide();
1620
-//		}else {
1621
-//			 $('#wuliaotian').hide();	 
1622
-//			 $('#wuliao').show();
1623
-//				
1624
-//		}							
1625
-//	//根据物料编码获取信息
1626
-//
1627
-//		$.ajax({
1628
-//			url: huayi.config.callcenter_url + 'MaterialManage/GetCodeModel',
1629
-//			data: {
1630
-//				code:$('#order_material').val(),
1631
-//				OpenId: openid, //微信openid,
1632
-//			},
1633
-//			async: true,
1634
-//			dataType: 'json',
1635
-//			type: 'get', //HTTP请求类型
1636
-//			success: function(data) {
1637
-//				if(data.state.toLowerCase() == "success") {
1638
-//					var result = data.data;
1639
-//					$("#wname").text(data.model.F_MaterialName);//物料名称
1640
-//					$("#xhao").text(data.model.F_Model),//型号
1641
-//					$("#gge").text(data.model.F_Specs);//规格
1642
-//					$("#yijif").text(data.model.F_Level1);//一级分类
1643
-//					$("#erjif").text(data.model.F_Level2);//二级分类
1644
-//					$("#sanjif").text(data.model.F_Level3);//三级分类
1645
-//					$('#pinp').text(data.model.F_Brand);//品牌
1646
-//					$('#fhffx').text(data.model.F_MaterialEffect); //复合肥肥效
1647
-//					$('#cpxx').text(data.model.F_Pipeline); //产品线tensions
1648
-//					$("#gyii").text(data.model.F_Craft);//工艺
1649
-//				}
1650
-//			},
1651
-//			error: function(xhr, type, errorThrown) {
1652
-//				//异常处理;
1653
-//			}
1654
-//		})
1655
-//	
1656
-//});
1613
+$('#order_material').blur(function () {
1614
+//             alert($(this).val());
1615
+			// $('#material').show();
1616
+		if($(this).val()==''){
1617
+			 $('#wuliaotian').show();
1618
+			 $('#wuliao').hide();
1619
+		}else {
1620
+			 $('#wuliaotian').hide();	 
1621
+			 $('#wuliao').show();
1622
+				
1623
+		}							
1624
+	//根据物料编码获取信息
1625
+
1626
+		$.ajax({
1627
+			url: huayi.config.callcenter_url + 'MaterialManage/GetCodeModel',
1628
+			data: {
1629
+				code:$('#order_material').val(),
1630
+				OpenId: openid, //微信openid,
1631
+			},
1632
+			async: true,
1633
+			dataType: 'json',
1634
+			type: 'get', //HTTP请求类型
1635
+			success: function(data) {
1636
+				if(data.state.toLowerCase() == "success") {
1637
+					var result = data.data;
1638
+					$("#order_mingcheng").val(result.model.F_MaterialName);//物料名称
1639
+					$("#order_xinghao").val(result.model.F_Model),//型号
1640
+					$("#order_guige").val(result.model.F_Specs);//规格
1641
+					$("#order_yiji").val(result.model.F_Level1);//一级分类
1642
+					$("#order_erji").val(result.model.F_Level2);//二级分类
1643
+					$("#order_sanji").val(result.model.F_Level3);//三级分类
1644
+					$('#order_pinpa').val(result.model.F_Brand);//品牌
1645
+					$('#order_fuhefei').val(result.model.F_MaterialEffect); //复合肥肥效
1646
+					$('#order_chanpinxian').val(result.model.F_Pipeline); //产品线tensions
1647
+					$("#order_gongyi").val(result.model.F_Craft);//工艺
1648
+				}
1649
+			},
1650
+			error: function(xhr, type, errorThrown) {
1651
+				//异常处理;
1652
+			}
1653
+		})
1654
+	
1655
+});

+ 20 - 106
WeChat/client-side/js/establish.js

@@ -77,80 +77,16 @@ $('.zhipp').find('input[type="radio"]').on('change', function() {
77 77
 				data: {
78 78
 					F_Source: $('#order_source').attr('data-index'), //工单来源
79 79
 					F_Type: $('.order_type').find('input[type="radio"]:checked').val(), //工单类型
80
-           //	咨询模块
81
-                    F_AddressFull: $("#order_category").attr('data-index'), //问题类别
82
-					F_TS_Category: $("#order_productname").attr('data-index'), //产品名称
83
-					F_TS_Category: $("#order_qita").val(), //其他输入
84
-					F_ZX_Quantity: $("#order_Claimnumber").val(), //咨询数量
85
-					F_ZX_Area: $("#order_macrocell").attr('data-index'), //大区
86
-					F_ZX_Branch: $("#order_branch").attr('data-index'), //分公司
87
-					F_IncidentProvince: $("#choworder_rengin").attr('data-index'), //省
88
-					F_IncidentCity: $("#shouorder_shi").attr('data-index'), //市
89
-					F_IncidentCountry: $("#chouorder_xian").attr('data-index'), //县
90
-					F_IncidentTownship: $("#chouorder_xiang").attr('data-index'), //乡
91
-			//投诉模块
92
-			        F_CustomerID: $("#order_coding").val(), //客户编码
93
-					F_MaterialID: $("#order_material").val(), //物料编码
94
-					F_QuestionType: $("#order_cate").attr('data-index'), //问题类别
95
-					F_QuestionType: $("#order_category").attr('data-index'), //问题类别
96
-					F_BatchNumber: $("#order_batch").val(), //生产批号
97
-					F_TS_Formula: $("#order_recipe").val(), //配方
98
-					F_TS_Category: $("#order_productname").attr('data-index'), //产品名称
99
-					F_TS_Category: $("#order_qi").val(), //其他输入
100
-					F_TS_Quantity: $("#order_Claimnumber").val(), //问题数量
101
-					F_TS_Level: $("#order_rank").attr('data-index'), //重要级别
102
-			//抽检模块
103
-			        F_QuestionType: $("#order_response").attr('data-index'), //问题类别
104
-			        F_CustomerID: $("#order_coding").val(), //客户编码
105
-					F_MaterialID: $("#order_material").val(), //物料编码
106
-					F_CJ_Time: $("#order_time").val(), //抽检时间
107
-					F_QuestionType: $("#order_response").attr('data-index'), //问题类别
108
-			        F_CJ_Level: $("#order_Samplingle").attr('data-index'), //抽检级别
109
-			        F_CJ_Unit: $("#order_lingunit").attr('data-index'), //抽检单位
110
-			        F_CJ_TestUnit: $("#order_assay").val(), //化验单位
111
-			        F_CJ_Tonnage: $("#order_tunnage").val(), //抽检吨数
112
-			        F_CJ_BagNo: $("#order_algebra").val(), //抽检袋数
113
-			        F_CJ_Outlay: $("#order_money").val(), //费用金额
114
-			//公共字段
115 80
 					F_CusName: $('#order_name').val(), //客户姓名
116 81
 					F_CusPhone: $('#order_phone').val(), //否	string	客户电话
117 82
 					F_CompanyName: $("#order_tel").val(), //公司名称
118
-//					
119 83
 					F_IncidentDetailed: $("#order_tower").val(), //详细地址
120
-					F_SalesBase: $("#ower_relationship").attr('data-index'), //销售基地
121 84
 					F_Description: $("#order_reception").val(), //问题描述
122
-					F_WxOpenId: openid, //微信openid,
123
-//					"token": $.cookie("token")
124
-//					iseffective: $('#order_valid').find('input[type="radio"]:checked').val(), //	否	int	是否有效工单项(0有效,1无效)
125
-//					note: $('#order_note').val(), // 无效原因	否	string	备注 (iseffective,1无效时填写备注)
126
-//					clbm: $('#recive_type').attr('data-index'),	//否	int	咨询类工单指派部门id
127
-//					clid: $('#ower_recive').attr('data-index'), //	否	string	接收人id $(this)
128
-					//$('#order_receiveUser option').find("option:selected").val(),
129
-					
85
+					F_WxOpenId: openid, //微信openid,				
130 86
 				},
131 87
 				success: function(data) {
132 88
 					if(data.state == "success") {
133 89
 						debugger
134
-//						//alert($('#order_reception').val()), //描述详情
135
-//						mui.toast('创建成功');
136
-//						$('#order_type').val(''); //工单类型
137
-//						$('#order_name').val(''), //客户姓名
138
-//						$('#order_tel').val(''), //否	string	联系电话
139
-//						$("#order_rengin").attr(''), //区域名称
140
-//						$("#order_pro").attr(''), //项目名称
141
-//						$("#order_floor").attr(''), //楼号
142
-//						$('#order_room').val(''), //房间号
143
-//						$('#ower_relationship').attr(''), //房东关系
144
-//						$('#order_response').find('input[type="radio"]:checked').val(), //否	int	客户反应
145
-//						$('#complaintOrder_type').attr(''), //否	int	处理部门(投诉类型)
146
-//						$('#serviceOrder_type').attr(''), //否int	客服类类型	
147
-//						$('#is_quality_assurance').attr(''), //否	int	是,//否过质保
148
-//						//$('#order_reception').val(''), //描述详情
149
-//						$('#order_responsible').val(''), //否	string	受理人
150
-//						$('#order_valid').find('input[type="radio"]:checked').val(), //	否	int	是否有效工单项(0有效,1无效)
151
-//						$('#order_note').val(''), // 无效原因	否	string	备注 (iseffective,1无效时填写备注)
152
-//						$('#recive_type').attr(''), //$('#order_transfer_dept').attr('data-id')	否	int	咨询类工单指派部门id
153
-//						$('#ower_recive').attr(''), //	否	string	接收人id $(this)
154 90
 						window.location.href = "../fisrt_comprehensive/tourist.html";
155 91
 					} else {
156 92
 						mui.toast(data.message);
@@ -166,51 +102,29 @@ $('.zhipp').find('input[type="radio"]').on('change', function() {
166 102
 function getDepts() {}
167 103
 	
168 104
 
169
-////问题类别
170
-//var  ke = [];
105
+//渠道类型
106
+//var  keee = [];
171 107
 //	$.ajax({
172 108
 //		type: "get",
173 109
 //		url: huayi.config.callcenter_url + 'Dictionary/GetDicValueListByFlagWx',
174 110
 //		async: false,
175 111
 //		data: {
176
-//			flag: 'ZXWTLB',
177
-//			type:3,
112
+//			flag: 'QDLX'
178 113
 //		},
179 114
 //		dataType: 'json',
180 115
 //		success: function(data) {
181 116
 //			var key_data = data.data;
117
+////			console.log(key_data);
182 118
 //			$(key_data).each(function(i, n) {
183 119
 //				var obj = {};
184 120
 //				obj.value = n.F_DictionaryValueId;
185 121
 //				obj.text = n.F_Name;
186
-//				ke.push(obj)
122
+//				keee.push(obj)
123
+////				console.log(ke);
187 124
 //			})
188 125
 //		}
189 126
 //	});
190 127
 
191
-//渠道类型
192
-var  keee = [];
193
-	$.ajax({
194
-		type: "get",
195
-		url: huayi.config.callcenter_url + 'Dictionary/GetDicValueListByFlagWx',
196
-		async: false,
197
-		data: {
198
-			flag: 'QDLX'
199
-		},
200
-		dataType: 'json',
201
-		success: function(data) {
202
-			var key_data = data.data;
203
-//			console.log(key_data);
204
-			$(key_data).each(function(i, n) {
205
-				var obj = {};
206
-				obj.value = n.F_DictionaryValueId;
207
-				obj.text = n.F_Name;
208
-				keee.push(obj)
209
-//				console.log(ke);
210
-			})
211
-		}
212
-	});
213
-
214 128
 
215 129
 
216 130
 
@@ -226,19 +140,19 @@ var  keee = [];
226 140
 		$.ready(function() {
227 141
 					
228 142
 		
229
-			//游客渠道类型
230
-			var citye = new $.PopPicker();
231
-				citye.setData(keee);
232
-				var showCityPickerButt = doc.getElementById('trench');
233
-				var cityResultion = doc.getElementById('manager');
234
-				showCityPickerButt.addEventListener('tap', function(event) {
235
-					citye.show(function(items) {
236
-						cityResultion.value = items[0].text;
237
-						cityResultion.setAttribute("data-index", items[0].value);
238
-						//返回 false 可以阻止选择框的关闭
239
-						//return false;
240
-					});
241
-			}, false);
143
+//			//游客渠道类型
144
+//			var citye = new $.PopPicker();
145
+//				citye.setData(keee);
146
+//				var showCityPickerButt = doc.getElementById('trench');
147
+//				var cityResultion = doc.getElementById('manager');
148
+//				showCityPickerButt.addEventListener('tap', function(event) {
149
+//					citye.show(function(items) {
150
+//						cityResultion.value = items[0].text;
151
+//						cityResultion.setAttribute("data-index", items[0].value);
152
+//						//返回 false 可以阻止选择框的关闭
153
+//						//return false;
154
+//					});
155
+//			}, false);
242 156
 			
243 157
 			
244 158