Browse Source

物资状态修改

liuzhen 5 years ago
parent
commit
a5b070849d

+ 10 - 4
CallCenterWeb.UI/ArchivesManagement/js/addOrEditArchivesList.js

@@ -9,11 +9,14 @@ $(function() {
9 9
 	}, function(result) {
10 10
 		if(result.state.toLowerCase() == "success") {
11 11
 			seatlist = result.data;
12
-//			WZstate($("#state"));
12
+			WZstate($("#state"));
13 13
 		}
14 14
 	});
15 15
 	if(editId){
16 16
 		getArchivesDetail(editId);
17
+		$('#state').attr('disabled',true)
18
+	}else{
19
+		$('#state').attr('disabled',false)
17 20
 	}
18 21
 	$('#btn_save').click(function() {
19 22
 		saveArchives()
@@ -34,12 +37,16 @@ $(function() {
34 37
 			layer.msg('请输入物资名称!')
35 38
 			return
36 39
 		}
40
+		if(!$('#state').val()){
41
+			layer.msg('请选择物资状态!')
42
+			return
43
+		}
37 44
 		$.post(huayi.config.callcenter_url + 'archives/AddorUpdateArchives', {
38 45
 			isadd: isadd,
39 46
 			id: editId,
40 47
 			A_archiveCode: $('#customer_code').val(),
41 48
 			A_archiveName: $('#customer_name').val(),
42
-			A_archiveState: $('#stateid').val(),
49
+			A_archiveState: $('#state').val(),
43 50
 			token: $.cookie("token")
44 51
 		}, function(data) {
45 52
 			data = JSON.parse(data);
@@ -73,8 +80,7 @@ function getArchivesDetail(editId) {
73 80
 		if(data.state=='success'){
74 81
 			$('#customer_code').val(data.data.A_archiveCode);
75 82
 			$('#customer_name').val(data.data.A_archiveName);
76
-			$('#state').val(data.data.stateName);
77
-			$('#stateid').val(data.data.A_archiveState);
83
+			$('#state').val(data.data.A_archiveState);
78 84
 		}
79 85
 	})
80 86
 }

+ 3 - 5
CallCenterWeb.UI/commonTpl/addOrEditArchivesList.html

@@ -29,13 +29,11 @@
29 29
 						</div>
30 30
 					</li>
31 31
 					<li class="form-group">
32
-						<label for="customer_notes" class="col-md-2">物资状态</label>
32
+						<label for="customer_notes" class="col-md-2"><b class="text_require">*</b>物资状态</label>
33 33
 						<div class="col-md-4">
34
-							<input id="state" class="form-control" type="text" autocomplete="off" disabled style="background-color: #fff;"/>
35
-							<input id="stateid" class="form-control" type="hidden" autocomplete="off"/>
36
-							<!--<select id="state" class="form-control" disabled>
34
+							<select id="state" class="form-control">
37 35
 								<option value="">请选择物资状态</option>
38
-							</select>-->
36
+							</select>
39 37
 						</div>
40 38
 					</li>
41 39
 				</ul>