Selaa lähdekoodia

后台系统-序列号出厂套餐-核对功能

linhaohong 1 vuosi sitten
vanhempi
commit
5c5d2b5f99
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. 3 1
      AdminController/UnicomManageController.py

+ 3 - 1
AdminController/UnicomManageController.py

@@ -1491,6 +1491,7 @@ class UnicomManageControllerView(View):
         try:
             serial_list = []
             file = request.FILES['serialFile']
+            opt_type = int(request_dict.get('optType', 1))
             for line in file:
                 serial_number = line.decode().strip()[0:9]
                 serial_list.append(serial_number)
@@ -1510,7 +1511,8 @@ class UnicomManageControllerView(View):
                     return response.json(0)
                 for item in pck_qs:
                     package_list.append(item)
-
+            if opt_type == 1:
+                return response.json(0, {'fileTotal': total_count, 'queryCount': len(package_list)})
             combo_list = list(UnicomCombo.objects.filter(is_del=False).values('id', 'combo_name'))
 
             # 创建一个新的excel文档