@@ -3,48 +3,153 @@  | 
            ||
| 3 | 3 | 
                <!DOCTYPE html>  | 
            
| 4 | 4 | 
                <html lang="zh-CN">  | 
            
| 5 | 5 | 
                <head>  | 
            
| 6 | 
                - <meta charset="utf-8">  | 
            |
| 7 | 
                - <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">  | 
            |
| 8 | 
                - <meta name="format-detection" content="telephone=no,email=no,address=no">  | 
            |
| 9 | 
                - <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">  | 
            |
| 6 | 
                + <meta charset="utf-8" />  | 
            |
| 7 | 
                + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />  | 
            |
| 8 | 
                + <meta  | 
            |
| 9 | 
                + name="format-detection"  | 
            |
| 10 | 
                + content="telephone=no,email=no,address=no"  | 
            |
| 11 | 
                + />  | 
            |
| 12 | 
                + <meta  | 
            |
| 13 | 
                + name="viewport"  | 
            |
| 14 | 
                + content="width=device-width,initial-scale=1.0,user-scalable=no"  | 
            |
| 15 | 
                + />  | 
            |
| 10 | 16 | 
                <title>店员授权</title>  | 
            
| 11 | 17 | 
                 | 
            
| 12 | 
                - <link href="//res.wx.qq.com/open/libs/weui/0.4.3/weui.min.css" rel="stylesheet" type="text/css" />  | 
            |
| 13 | 
                -        <link href="{% static 'page/css/weui.ext.css' %}?v=1" rel="stylesheet" type="text/css" />
               | 
            |
| 18 | 
                + <link  | 
            |
| 19 | 
                + href="//res.wx.qq.com/open/libs/weui/0.4.3/weui.min.css"  | 
            |
| 20 | 
                + rel="stylesheet"  | 
            |
| 21 | 
                + type="text/css"  | 
            |
| 22 | 
                + />  | 
            |
| 23 | 
                + <link  | 
            |
| 24 | 
                +            href="{% static 'page/css/weui.ext.css' %}?v=1"
               | 
            |
| 25 | 
                + rel="stylesheet"  | 
            |
| 26 | 
                + type="text/css"  | 
            |
| 27 | 
                + />  | 
            |
| 14 | 28 | 
                </head>  | 
            
| 15 | 29 | 
                <body>  | 
            
| 16 | 
                - <div class="container" >  | 
            |
| 30 | 
                + <div class="container">  | 
            |
| 17 | 31 | 
                <div class="weui_cells_title">基本信息</div>  | 
            
| 18 | 32 | 
                <div class="weui_cells weui_cells_form">  | 
            
| 19 | 33 | 
                <div class="weui_cell weui_cell_select weui_select_after">  | 
            
| 20 | 
                - <div class="weui_cell_hd"><label for="" class="weui_label">经销商</label></div>  | 
            |
| 34 | 
                + <div class="weui_cell_hd">  | 
            |
| 35 | 
                + <label for="" class="weui_label">经销商</label>  | 
            |
| 36 | 
                + </div>  | 
            |
| 21 | 37 | 
                <div class="weui_cell_bd weui_cell_primary">  | 
            
| 22 | 
                -                        <select id="distributor" class="weui_select" name="select" {% if not modified %}disabled{% endif %}>
               | 
            |
| 38 | 
                + <select  | 
            |
| 39 | 
                + id="distributor"  | 
            |
| 40 | 
                + class="weui_select"  | 
            |
| 41 | 
                + name="select"  | 
            |
| 42 | 
                +                            {%
               | 
            |
| 43 | 
                + if  | 
            |
| 44 | 
                + not  | 
            |
| 45 | 
                + modified  | 
            |
| 46 | 
                +                            %}disabled{%
               | 
            |
| 47 | 
                + endif  | 
            |
| 48 | 
                + %}  | 
            |
| 49 | 
                + >  | 
            |
| 23 | 50 | 
                                             {% for distributor in distributors %}
               | 
            
| 24 | 
                -                            <option value="{{ distributor.distributor_id }}" {% ifequal distributor.distributor_id clerk_info.distributor_id %}selected{% endifequal %}>{{ distributor.distributor_name }}</option>
               | 
            |
| 51 | 
                + <option  | 
            |
| 52 | 
                +                                value="{{ distributor.distributor_id }}"
               | 
            |
| 53 | 
                +                                {%
               | 
            |
| 54 | 
                + ifequal  | 
            |
| 55 | 
                + distributor.distributor_id  | 
            |
| 56 | 
                + clerk_info.distributor_id  | 
            |
| 57 | 
                +                                %}selected{%
               | 
            |
| 58 | 
                + endifequal  | 
            |
| 59 | 
                + %}  | 
            |
| 60 | 
                + >  | 
            |
| 61 | 
                +                                {{ distributor.distributor_name }}
               | 
            |
| 62 | 
                + </option>  | 
            |
| 25 | 63 | 
                                             {% endfor %}
               | 
            
| 26 | 64 | 
                </select>  | 
            
| 27 | 65 | 
                </div>  | 
            
| 28 | 66 | 
                </div>  | 
            
| 29 | 67 | 
                <div class="weui_cell">  | 
            
| 30 | 
                - <div class="weui_cell_hd"><label for="" class="weui_label">姓名</label></div>  | 
            |
| 68 | 
                + <div class="weui_cell_hd">  | 
            |
| 69 | 
                + <label for="" class="weui_label">姓名</label>  | 
            |
| 70 | 
                + </div>  | 
            |
| 31 | 71 | 
                <div class="weui_cell_bd weui_cell_primary">  | 
            
| 32 | 
                -                        <input id="name" class="weui_input" type="text" value="{{ clerk_info.clerk_name }}" placeholder="请输入姓名" {% if not modified %}disabled{% endif %}>
               | 
            |
| 72 | 
                + <input  | 
            |
| 73 | 
                + id="name"  | 
            |
| 74 | 
                + class="weui_input"  | 
            |
| 75 | 
                + type="text"  | 
            |
| 76 | 
                +                            value="{{ clerk_info.clerk_name }}"
               | 
            |
| 77 | 
                + placeholder="请输入姓名"  | 
            |
| 78 | 
                +                            {%
               | 
            |
| 79 | 
                + if  | 
            |
| 80 | 
                + not  | 
            |
| 81 | 
                + modified  | 
            |
| 82 | 
                +                            %}disabled{%
               | 
            |
| 83 | 
                + endif  | 
            |
| 84 | 
                + %}  | 
            |
| 85 | 
                + />  | 
            |
| 33 | 86 | 
                </div>  | 
            
| 34 | 87 | 
                </div>  | 
            
| 35 | 88 | 
                <div class="weui_cell weui_cell_select weui_select_after">  | 
            
| 36 | 
                - <div class="weui_cell_hd"><label for="" class="weui_label">性别</label></div>  | 
            |
| 89 | 
                + <div class="weui_cell_hd">  | 
            |
| 90 | 
                + <label for="" class="weui_label">性别</label>  | 
            |
| 91 | 
                + </div>  | 
            |
| 37 | 92 | 
                <div class="weui_cell_bd weui_cell_primary">  | 
            
| 38 | 
                -                        <select id="sex" class="weui_select" name="select" {% if not modified %}disabled{% endif %}>
               | 
            |
| 39 | 
                -                            <option value="1" {% ifequal clerk_info.clerk_sex 1 %}selected{% endifequal %}>男</option>
               | 
            |
| 40 | 
                -                            <option value="0" {% ifequal clerk_info.clerk_sex 0 %}selected{% endifequal %}>女</option>
               | 
            |
| 93 | 
                + <select  | 
            |
| 94 | 
                + id="sex"  | 
            |
| 95 | 
                + class="weui_select"  | 
            |
| 96 | 
                + name="select"  | 
            |
| 97 | 
                +                            {%
               | 
            |
| 98 | 
                + if  | 
            |
| 99 | 
                + not  | 
            |
| 100 | 
                + modified  | 
            |
| 101 | 
                +                            %}disabled{%
               | 
            |
| 102 | 
                + endif  | 
            |
| 103 | 
                + %}  | 
            |
| 104 | 
                + >  | 
            |
| 105 | 
                + <option  | 
            |
| 106 | 
                + value="1"  | 
            |
| 107 | 
                +                                {%
               | 
            |
| 108 | 
                + ifequal  | 
            |
| 109 | 
                + clerk_info.clerk_sex  | 
            |
| 110 | 
                + 1  | 
            |
| 111 | 
                +                                %}selected{%
               | 
            |
| 112 | 
                + endifequal  | 
            |
| 113 | 
                + %}  | 
            |
| 114 | 
                + >  | 
            |
| 115 | 
                + 男  | 
            |
| 116 | 
                + </option>  | 
            |
| 117 | 
                + <option  | 
            |
| 118 | 
                + value="0"  | 
            |
| 119 | 
                +                                {%
               | 
            |
| 120 | 
                + ifequal  | 
            |
| 121 | 
                + clerk_info.clerk_sex  | 
            |
| 122 | 
                + 0  | 
            |
| 123 | 
                +                                %}selected{%
               | 
            |
| 124 | 
                + endifequal  | 
            |
| 125 | 
                + %}  | 
            |
| 126 | 
                + >  | 
            |
| 127 | 
                + 女  | 
            |
| 128 | 
                + </option>  | 
            |
| 41 | 129 | 
                </select>  | 
            
| 42 | 130 | 
                </div>  | 
            
| 43 | 131 | 
                </div>  | 
            
| 44 | 132 | 
                <div class="weui_cell">  | 
            
| 45 | 
                - <div class="weui_cell_hd"><label for="" class="weui_label">手机号</label></div>  | 
            |
| 133 | 
                + <div class="weui_cell_hd">  | 
            |
| 134 | 
                + <label for="" class="weui_label">手机号</label>  | 
            |
| 135 | 
                + </div>  | 
            |
| 46 | 136 | 
                <div class="weui_cell_bd weui_cell_primary">  | 
            
| 47 | 
                -                        <input id="phone" class="weui_input" type="text" required="required" pattern="[0-9]{11}" value="{{ clerk_info.clerk_phone }}" placeholder="请输入手机号" {% if not modified %}disabled{% endif %}>
               | 
            |
| 137 | 
                + <input  | 
            |
| 138 | 
                + id="phone"  | 
            |
| 139 | 
                + class="weui_input"  | 
            |
| 140 | 
                + type="text"  | 
            |
| 141 | 
                + required="required"  | 
            |
| 142 | 
                +                            pattern="[0-9]{11}"
               | 
            |
| 143 | 
                +                            value="{{ clerk_info.clerk_phone }}"
               | 
            |
| 144 | 
                + placeholder="请输入手机号"  | 
            |
| 145 | 
                +                            {%
               | 
            |
| 146 | 
                + if  | 
            |
| 147 | 
                + not  | 
            |
| 148 | 
                + modified  | 
            |
| 149 | 
                +                            %}disabled{%
               | 
            |
| 150 | 
                + endif  | 
            |
| 151 | 
                + %}  | 
            |
| 152 | 
                + />  | 
            |
| 48 | 153 | 
                </div>  | 
            
| 49 | 154 | 
                </div>  | 
            
| 50 | 155 | 
                </div>  | 
            
                @@ -65,36 +170,45 @@  | 
            ||
| 65 | 170 | 
                </div>  | 
            
| 66 | 171 | 
                </div>  | 
            
| 67 | 172 | 
                </div>  | 
            
| 68 | 
                -            {% endif %}
               | 
            |
| 69 | 
                -  | 
            |
| 70 | 
                -  | 
            |
| 71 | 
                -            {% ifequal clerk_info.status -1 %}
               | 
            |
| 173 | 
                +            {% endif %} {% ifequal clerk_info.status -1 %}
               | 
            |
| 72 | 174 | 
                <div class="weui_cells_title">拒绝原因</div>  | 
            
| 73 | 175 | 
                <div class="weui_cells">  | 
            
| 74 | 176 | 
                <div class="weui_panel_bd">  | 
            
| 75 | 177 | 
                <div class="weui_media_box weui_media_text">  | 
            
| 76 | 
                -                        <p class="weui_media_desc">{{ clerk_info.refused_reason|safe|linebreaks }}</p>
               | 
            |
| 178 | 
                + <p class="weui_media_desc">  | 
            |
| 179 | 
                +                            {{ clerk_info.refused_reason|safe|linebreaks }}
               | 
            |
| 180 | 
                + </p>  | 
            |
| 77 | 181 | 
                </div>  | 
            
| 78 | 182 | 
                </div>  | 
            
| 79 | 183 | 
                </div>  | 
            
| 80 | 184 | 
                             {% endifequal %}
               | 
            
| 81 | 185 | 
                 | 
            
| 82 | 
                - <br>  | 
            |
| 186 | 
                + <br />  | 
            |
| 83 | 187 | 
                 | 
            
| 84 | 
                -            {% if modified %}<button id="submit" class="weui_btn weui_btn_warn">{% if clerk_info %}重新提交{% else %}提交{% endif %}</button>{% endif %}
               | 
            |
| 188 | 
                +            {% if modified %}<button id="submit" class="weui_btn weui_btn_warn">
               | 
            |
| 189 | 
                +                {% if clerk_info %}重新提交{% else %}提交{% endif %}</button
               | 
            |
| 190 | 
                +            >{% endif %}
               | 
            |
| 85 | 191 | 
                 | 
            
| 86 | 192 | 
                <div class="weui_dialog_alert" id="dialog" style="display: none">  | 
            
| 87 | 193 | 
                <div class="weui_mask"></div>  | 
            
| 88 | 194 | 
                <div class="weui_dialog">  | 
            
| 89 | 
                - <div class="weui_dialog_hd"><strong id="title" class="weui_dialog_title">弹窗标题</strong></div>  | 
            |
| 90 | 
                - <div id="content" class="weui_dialog_bd">弹窗内容,告知当前页面信息等</div>  | 
            |
| 195 | 
                + <div class="weui_dialog_hd">  | 
            |
| 196 | 
                + <strong id="title" class="weui_dialog_title"  | 
            |
| 197 | 
                + >弹窗标题</strong  | 
            |
| 198 | 
                + >  | 
            |
| 199 | 
                + </div>  | 
            |
| 200 | 
                + <div id="content" class="weui_dialog_bd">  | 
            |
| 201 | 
                + 弹窗内容,告知当前页面信息等  | 
            |
| 202 | 
                + </div>  | 
            |
| 91 | 203 | 
                <div class="weui_dialog_ft">  | 
            
| 92 | 
                - <a href="javascript:;" class="weui_btn_dialog primary">确定</a>  | 
            |
| 204 | 
                + <a href="javascript:;" class="weui_btn_dialog primary"  | 
            |
| 205 | 
                + >确定</a  | 
            |
| 206 | 
                + >  | 
            |
| 93 | 207 | 
                </div>  | 
            
| 94 | 208 | 
                </div>  | 
            
| 95 | 209 | 
                </div>  | 
            
| 96 | 210 | 
                 | 
            
| 97 | 
                - <div id="toast" style="display: none;">  | 
            |
| 211 | 
                + <div id="toast" style="display: none">  | 
            |
| 98 | 212 | 
                <div class="weui_mask_transparent"></div>  | 
            
| 99 | 213 | 
                <div class="weui_toast">  | 
            
| 100 | 214 | 
                <i class="weui_icon_toast"></i>  | 
            
                @@ -104,9 +218,20 @@  | 
            ||
| 104 | 218 | 
                </div>  | 
            
| 105 | 219 | 
                 | 
            
| 106 | 220 | 
                <script>  | 
            
| 107 | 
                -            window.onerror = function(errorMessage, scriptURI, lineNo, columnNo, error) {
               | 
            |
| 108 | 
                -                if (['Uncaught ReferenceError: WeixinJSBridge is not defined', 'ResizeObserver loop limit exceeded'].indexOf(errorMessage) >= 0) {
               | 
            |
| 109 | 
                - return  | 
            |
| 221 | 
                + window.onerror = function (  | 
            |
| 222 | 
                + errorMessage,  | 
            |
| 223 | 
                + scriptURI,  | 
            |
| 224 | 
                + lineNo,  | 
            |
| 225 | 
                + columnNo,  | 
            |
| 226 | 
                + error  | 
            |
| 227 | 
                +            ) {
               | 
            |
| 228 | 
                + if (  | 
            |
| 229 | 
                + [  | 
            |
| 230 | 
                + "Uncaught ReferenceError: WeixinJSBridge is not defined",  | 
            |
| 231 | 
                + "ResizeObserver loop limit exceeded",  | 
            |
| 232 | 
                + ].indexOf(errorMessage) >= 0  | 
            |
| 233 | 
                +                ) {
               | 
            |
| 234 | 
                + return;  | 
            |
| 110 | 235 | 
                }  | 
            
| 111 | 236 | 
                // 构建错误对象  | 
            
| 112 | 237 | 
                                 var errorObj = {
               | 
            
                @@ -116,16 +241,16 @@  | 
            ||
| 116 | 241 | 
                columnNo: columnNo || 0,  | 
            
| 117 | 242 | 
                scriptURI: scriptURI || null,  | 
            
| 118 | 243 | 
                errorMessage: errorMessage || null,  | 
            
| 119 | 
                - stack: error && error.stack ? error.stack : null  | 
            |
| 244 | 
                + stack: error && error.stack ? error.stack : null,  | 
            |
| 120 | 245 | 
                };  | 
            
| 121 | 246 | 
                // 构建Http请求  | 
            
| 122 | 247 | 
                                 if (XMLHttpRequest) {
               | 
            
| 123 | 248 | 
                var xhr = new XMLHttpRequest();  | 
            
| 124 | 
                -                    xhr.open('post', '/e/report', true);
               | 
            |
| 125 | 
                -                    xhr.setRequestHeader('Content-Type', 'application/json'); // 设置请求头
               | 
            |
| 249 | 
                +                    xhr.open("post", "/e/report", true);
               | 
            |
| 250 | 
                +                    xhr.setRequestHeader("Content-Type", "application/json"); // 设置请求头
               | 
            |
| 126 | 251 | 
                xhr.send(JSON.stringify(errorObj)); // 发送参数  | 
            
| 127 | 252 | 
                }  | 
            
| 128 | 
                - }  | 
            |
| 253 | 
                + };  | 
            |
| 129 | 254 | 
                </script>  | 
            
| 130 | 255 | 
                <script src="//cdnjs.cloudflare.com/ajax/libs/zepto/1.1.6/zepto.min.js"></script>  | 
            
| 131 | 256 | 
                <script>  | 
            
                @@ -185,6 +310,9 @@  | 
            ||
| 185 | 310 | 
                                                 } else {
               | 
            
| 186 | 311 | 
                                                     show_error_dialog('错误', data.description);
               | 
            
| 187 | 312 | 
                }  | 
            
| 313 | 
                + },  | 
            |
| 314 | 
                +                            error: function(data){
               | 
            |
| 315 | 
                + show_error_dialog(status, error);  | 
            |
| 188 | 316 | 
                }  | 
            
| 189 | 317 | 
                })  | 
            
| 190 | 318 | 
                }  | 
            
                @@ -196,17 +324,26 @@  | 
            ||
| 196 | 324 | 
                });  | 
            
| 197 | 325 | 
                             {% endif %}
               | 
            
| 198 | 326 | 
                </script>  | 
            
| 199 | 
                - <script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>  | 
            |
| 200 | 
                -        <script type="text/javascript" src="{% static 'kodo/js/jswe-0.0.4.js' %}"></script>
               | 
            |
| 327 | 
                + <script  | 
            |
| 328 | 
                + type="text/javascript"  | 
            |
| 329 | 
                + src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"  | 
            |
| 330 | 
                + ></script>  | 
            |
| 331 | 
                + <script  | 
            |
| 332 | 
                + type="text/javascript"  | 
            |
| 333 | 
                +            src="{% static 'kodo/js/jswe-0.0.4.js' %}"
               | 
            |
| 334 | 
                + ></script>  | 
            |
| 201 | 335 | 
                <script>  | 
            
| 202 | 
                -            V.initWxData({
               | 
            |
| 203 | 
                - imgUrl: 'http://pai.ai/static/kodo/img/paiai_96_96.png',  | 
            |
| 204 | 
                - link: 'http://pai.ai/w/o?r=http%3A%2F%2Fkodo.xfoto.com.cn%2Fp%2Fclerk',  | 
            |
| 205 | 
                - desc: '店员授权',  | 
            |
| 206 | 
                - title: '店员授权',  | 
            |
| 207 | 
                - timeLine: ''  | 
            |
| 208 | 
                - }, true);  | 
            |
| 336 | 
                + V.initWxData(  | 
            |
| 337 | 
                +                {
               | 
            |
| 338 | 
                + imgUrl: "http://pai.ai/static/kodo/img/paiai_96_96.png",  | 
            |
| 339 | 
                + link: "http://pai.ai/w/o?r=http%3A%2F%2Fkodo.xfoto.com.cn%2Fp%2Fclerk",  | 
            |
| 340 | 
                + desc: "店员授权",  | 
            |
| 341 | 
                + title: "店员授权",  | 
            |
| 342 | 
                + timeLine: "",  | 
            |
| 343 | 
                + },  | 
            |
| 344 | 
                + true  | 
            |
| 345 | 
                + );  | 
            |
| 209 | 346 | 
                V.hideOptionMenu();  | 
            
| 210 | 347 | 
                </script>  | 
            
| 211 | 348 | 
                </body>  | 
            
| 212 | 
                -</html>  | 
            |
| 349 | 
                +</html>  |