|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+var id = helper.request.queryString("id");
|
|
|
2
|
+$(document).ready(function () {
|
|
|
3
|
+ //保存
|
|
|
4
|
+ $('.customerSubmit').click(function() {
|
|
|
5
|
+ saveCustomer();
|
|
|
6
|
+ });
|
|
|
7
|
+})
|
|
|
8
|
+
|
|
|
9
|
+//保存
|
|
|
10
|
+function saveCustomer() {
|
|
|
11
|
+ $.ajax({
|
|
|
12
|
+ type: "post",
|
|
|
13
|
+ url: huayi.config.callcenter_url + "WorkOrder/Return",
|
|
|
14
|
+ dataType: 'json',
|
|
|
15
|
+ async: true,
|
|
|
16
|
+ beforeSend: function() { //触发ajax请求开始时执行
|
|
|
17
|
+ $('.customerSubmit').attr("disabled", true);
|
|
|
18
|
+ $('.customerSubmit').text('确定中...');
|
|
|
19
|
+ },
|
|
|
20
|
+ data: {
|
|
|
21
|
+ token: $.cookie("token"),
|
|
|
22
|
+ id: id,
|
|
|
23
|
+ cont: $('#cont').val(), //提交内容
|
|
|
24
|
+ },
|
|
|
25
|
+ success: function(data) {
|
|
|
26
|
+ if (data.state.toLowerCase() == 'success') {
|
|
|
27
|
+ $('.customerSubmit').attr("disabled", false);
|
|
|
28
|
+ $('.customerSubmit').text('确定');
|
|
|
29
|
+ var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
|
|
30
|
+ parent.layer.close(index); //再执行关闭
|
|
|
31
|
+ parent.layer.msg("保存成功!");
|
|
|
32
|
+// parent.$('#workorderlist').bootstrapTable('refresh');
|
|
|
33
|
+// parent.$('#workorderlist_').bootstrapTable('refresh');
|
|
|
34
|
+// parent.$('#orderlist').bootstrapTable('refresh');
|
|
|
35
|
+ parent.initTable();
|
|
|
36
|
+ } else {
|
|
|
37
|
+ $('.customerSubmit').attr("disabled", false);
|
|
|
38
|
+ $('.customerSubmit').text('确定');
|
|
|
39
|
+ }
|
|
|
40
|
+ }
|
|
|
41
|
+ });
|
|
|
42
|
+
|
|
|
43
|
+}
|