() {#} 210
+{#                                        $('#toast').hide();#}
211
+{#                                    }, 1000);#}
212
+                                    show_error_dialog2('成功', '机器信息提交成功');
213
+                                } else {
214
+                                    show_error_dialog('错误', data.description);
215
+                                }
216
+                            }
217
+                        })
218
+                    }
219
+                });
220
+
221
+                $('#submit2').click(function () {
222
+                    var check_result = data_check2();
223
+                    if (check_result){
224
+                        $.ajax({
225
+                            type: 'POST',
226
+                            url: '{{ domain }}api/clerk/sale/submit',
227
+                            data: check_result,
228
+                            success: function(data) {
229
+                                if (data.status == 200) {
230
+                                    show_error_dialog('成功', '消费者信息提交成功');
165 231
                                 } else {
166 232
                                     show_error_dialog('错误', data.description);
167 233
                                 }
@@ -173,6 +239,12 @@
173 239
                 $('#dialog .weui_btn_dialog').click(function () {
174 240
                     $('#dialog').hide();
175 241
                 })
242
+
243
+                $('#dialog2 .weui_btn_dialog').click(function () {
244
+                    $('#dialog2').hide();
245
+                    $('#machine_info').hide();
246
+                    $('#customer_info').show();
247
+                })
176 248
             });
177 249
         </script>
178 250
         <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>

+ 1 - 0
utils/error/errno_utils.py

@@ -28,6 +28,7 @@ class ProductStatusCode(BaseStatusCode):
28 28
     PRODUCT_NOT_FOUND = StatusCodeField(402001, 'Product Not Found', description=u'产品不存在')
29 29
     # 状态
30 30
     PRODUCT_HAS_USED = StatusCodeField(402011, 'Product Has Used', description=u'产品已使用')
31
+    PRODUCT_NOT_USED = StatusCodeField(402012, 'Product Not Used', description=u'产品未使用')
31 32
 
32 33
 
33 34
 class OrderStatusCode(BaseStatusCode):

kodo - Gogs: Go Git Service

No Description

Brightcells: f724e0f9c0 Add tour guide apis 10 years ago
..
__init__.py f724e0f9c0 Add tour guide apis 10 years ago