cy
2022-06-28 2ba5c891b24d4d0cd6ce7ef833592e4f576ee5e8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!doctype html>
<html>
<head>
[#include "/business/wechat/include/title.html" /]
[#include "/business/wechat/include/wheader.html" /]
</head>
 
<body>
<header class="kltit">
    <div class="present"><a href="javascript:sendRepair();">提交</a></div><a href="javascript:history.go(-1);"><span></span></a>一键报修
</header>
        <div class="swiper-slide">
            <section class="wlresponse">
                <p>
                    <span>报修标题:</span>
                    <i>${info.CINAME}报修单
                        <input name="bx_title" id="bx_title" type="hidden" type="text" class="enter" value="${info.CINAME}报修单">
                    </i>
                </p>
                <p>
                    <span>联系人:</span>
                    <i><input name="lxr" id="lxr" placeholder="请输入联系人姓名" type="text" class="enter" value=""></i>
                </p>
                 <p>
                    <span>联系电话:</span>
                    <i><input name="lx_phone" id="lx_phone" placeholder="请输入联系方式" type="text" class="enter" value=""></i>
                </p>
                <p>
                    <span>报修内容:</span>
                    <i><textarea name="bx_content" placeholder="请填写保修内容" id="bx_content" cols="" rows="3" class="event-text"></textarea></i>
                </p>
            </section>
        </div>
<script type="text/javascript">
    
var b = false;
function sendRepair(){
        if(confirm("确定要报修吗?")) {
            if(!b) {
//                 b = true;
                var bx_title=$("#bx_title").val();
                var lxr=$("#lxr").val();
                var lx_phone=$("#lx_phone").val();
                var bx_content=$("#bx_content").val();
                var cateId='${info.id}';
                if(lxr.length>10){
                    window.top.popupTips("联系人长度不应大于10");
                    return;
                }
                if (!$.util.isMobile(lx_phone) && !$.util.isTelphone(lx_phone)) {
                    popupTips("联系电话格式不正确");
                    return;
                }
                if ($.util.isEmpty(lx_phone)) {
                    popupTips("联系电话不能为空");
                    return;
                }
                if(lx_phone.length>16){
                    window.top.popupTips("联系电话长度不应大于16");
                    return;
                }
                var param={"bx_title":bx_title,"lxr":lxr,"lx_phone":lx_phone,"bx_content":bx_content,"cateId":cateId};
                $("body").append("<div class='loading' id='loading'><img src='${common_static}/static/wechat/images/loading.gif' /></div>");
                $.post('${base}/wechat/saveFacBx.html',param,function(data){
                   $("#loading").remove();
                   b = false;
                   if(data == 1){
                      window.top.popupTips("报修成功");
                   }else{
                      window.top.popupTips(data);
                   }
                
                });
            } else {
                window.top.popupTips("正在报修,请稍后...");
            }
        }
}
</script>   
</body>
</html>