Kaynağa Gözat

库位界面bug

flower_mr 2 hafta önce
ebeveyn
işleme
1f2ce4a9dc

+ 10 - 8
bin/models.py

@@ -71,8 +71,13 @@ class LocationModel(models.Model):
                 layer__lte=layers
             ).values_list('row', 'col', 'layer')
         )
-        # 在LocationModel类中新增方法
-    
+
+    def get_active_containers(self):
+        return self.current_containers.filter(
+            available=True
+        )
+
+
     @classmethod
     def generate_locations(cls, warehouse_code):
          # 清空现有数据(新增部分)
@@ -866,20 +871,17 @@ class LocationContainerLink(models.Model):
     location = models.ForeignKey(
             LocationModel, 
             on_delete=models.CASCADE,
-            related_name='container_links',  # 关键修复点
+            related_name='container_links', 
             verbose_name='库位'
         )
     
     container = models.ForeignKey(
         ContainerListModel,
         on_delete=models.CASCADE,
-        related_name='location_links',   # 容器到链接的反向关联
+        related_name='location_links',  
         verbose_name='关联容器'
     )
-    task_wcs = models.ForeignKey(
-        ContainerWCSModel,
-        on_delete=models.CASCADE,
-    )
+
     task_wcs = models.ForeignKey(ContainerWCSModel, on_delete=models.CASCADE, null=True, blank=True)
     task_detail = models.ForeignKey(TaskModel, on_delete=models.CASCADE, null=True, blank=True)
     put_time = models.DateTimeField(auto_now_add=True, verbose_name='上架时间')

+ 1 - 1
bin/serializers.py

@@ -15,7 +15,7 @@ class LocationSerializer(serializers.ModelSerializer):
 class LocationListSerializer(serializers.ModelSerializer):
     current_containers = ContainerSimpleSerializer(
         many=True,
-        source='active_containers',  
+        source='get_active_containers',  
         read_only=True
     )
 

+ 14 - 13
container/views.py

@@ -1339,8 +1339,8 @@ class OutTaskViewSet(APIView):
                 container_map = {}
                 for cd in container_qs:
                     if cd.container_id in container_map:
-                        continue  # 跳过已处理容器
-                    
+                        container_map[cd.container_id]['goods_qty'] += cd.goods_qty
+                        continue
                     # 获取有效库位信息
                     active_location = next(
                         (link.location for link in cd.container.active_location 
@@ -1350,6 +1350,7 @@ class OutTaskViewSet(APIView):
                     
                     container_map[cd.container_id] = {
                         'detail': cd,
+                        'goods_qty': cd.goods_qty,
                         'container': cd.container,
                         'location': active_location
                     }
@@ -1377,7 +1378,7 @@ class OutTaskViewSet(APIView):
                         break
                     
                     # 获取可分配数量
-                    allocatable = item['detail'].goods_qty - item['detail'].goods_out_qty
+                    allocatable = item['goods_qty'] - item['detail'].goods_out_qty
                     allocate_qty = min(remaining, allocatable)
                     
                     # 记录分配信息
@@ -1423,16 +1424,16 @@ class OutTaskViewSet(APIView):
             )
             
             # 更新库位状态
-            if item['location']:
-                LocationModel.objects.filter(
-                    id=item['location'].id
-                ).update(
-                    current_quantity=F('current_quantity') - allocate_qty,
-                    status=Case(
-                        When(current_quantity=F('current_quantity') - allocate_qty, then='available'),
-                        default='occupied'
-                    )
-                )
+            # if item['location']:
+            #     LocationModel.objects.filter(
+            #         id=item['location'].id
+            #     ).update(
+            #         current_quantity=F('current_quantity') - allocate_qty
+            #         # status=Case(
+            #         #     When(current_quantity=F('current_quantity') - allocate_qty, then='available'),
+            #         #     default='occupied'
+            #         # )
+            #     )
                 
             return True
         except Exception as e:

BIN
db copy.sqlite3


+ 201 - 0
logs/error.log

@@ -8706,3 +8706,204 @@ Traceback (most recent call last):
   File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\query.py", line 2272, in prefetch_related_objects
     raise AttributeError(
 AttributeError: Cannot find 'container_links' on LocationModel object, 'container_links' is an invalid parameter to prefetch_related()
+[2025-05-20 11:32:06,997][django.request.log_response():241] [ERROR] Internal Server Error: /bound/detail/
+Traceback (most recent call last):
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\asgiref\sync.py", line 472, in thread_handler
+    raise exc_info[1]
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\core\handlers\exception.py", line 42, in inner
+    response = await get_response(request)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\core\handlers\base.py", line 253, in _get_response_async
+    response = await wrapped_callback(
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\asgiref\sync.py", line 435, in __call__
+    ret = await asyncio.wait_for(future, timeout=None)
+  File "D:\language\python38\lib\asyncio\tasks.py", line 455, in wait_for
+    return await fut
+  File "D:\language\python38\lib\concurrent\futures\thread.py", line 57, in run
+    result = self.fn(*self.args, **self.kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\asgiref\sync.py", line 476, in thread_handler
+    return func(*args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\views\decorators\csrf.py", line 54, in wrapped_view
+    return view_func(*args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\viewsets.py", line 125, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 509, in dispatch
+    response = self.handle_exception(exc)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 469, in handle_exception
+    self.raise_uncaught_exception(exc)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 480, in raise_uncaught_exception
+    raise exc
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 506, in dispatch
+    response = handler(request, *args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.\bound\views.py", line 650, in create
+    data['detail_code'] = f"DC-{data['bound_list']:02}{data['bound_batch']:02}"
+KeyError: 'bound_list'
+[2025-05-20 12:30:48,128][django.request.log_response():241] [ERROR] Internal Server Error: /container/container_wcs/
+[2025-05-20 22:21:17,214][django.request.log_response():241] [ERROR] Internal Server Error: /bin/667/
+Traceback (most recent call last):
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\asgiref\sync.py", line 472, in thread_handler
+    raise exc_info[1]
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\core\handlers\exception.py", line 42, in inner
+    response = await get_response(request)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\core\handlers\base.py", line 253, in _get_response_async
+    response = await wrapped_callback(
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\asgiref\sync.py", line 435, in __call__
+    ret = await asyncio.wait_for(future, timeout=None)
+  File "D:\language\python38\lib\asyncio\tasks.py", line 455, in wait_for
+    return await fut
+  File "D:\language\python38\lib\concurrent\futures\thread.py", line 57, in run
+    result = self.fn(*self.args, **self.kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\asgiref\sync.py", line 476, in thread_handler
+    return func(*args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\views\decorators\csrf.py", line 54, in wrapped_view
+    return view_func(*args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\viewsets.py", line 125, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 509, in dispatch
+    response = self.handle_exception(exc)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 469, in handle_exception
+    self.raise_uncaught_exception(exc)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 480, in raise_uncaught_exception
+    raise exc
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 506, in dispatch
+    response = handler(request, *args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\mixins.py", line 56, in retrieve
+    return Response(serializer.data)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\serializers.py", line 555, in data
+    ret = super().data
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\serializers.py", line 253, in data
+    self._data = self.to_representation(self.instance)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\serializers.py", line 507, in to_representation
+    for field in fields:
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\serializers.py", line 368, in _readable_fields
+    for field in self.fields.values():
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\utils\functional.py", line 57, in __get__
+    res = instance.__dict__[self.name] = self.func(instance)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\serializers.py", line 357, in fields
+    fields[key] = value
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\utils\serializer_helpers.py", line 169, in __setitem__
+    field.bind(field_name=key, parent=self.serializer)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\fields.py", line 367, in bind
+    assert self.source != field_name, (
+AssertionError: It is redundant to specify `source='current_containers'` on field 'ListSerializer' in serializer 'LocationListSerializer', because it is the same as the field name. Remove the `source` keyword argument.
+[2025-05-20 22:35:37,288][django.request.log_response():241] [ERROR] Internal Server Error: /bin/667/
+Traceback (most recent call last):
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\asgiref\sync.py", line 472, in thread_handler
+    raise exc_info[1]
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\core\handlers\exception.py", line 42, in inner
+    response = await get_response(request)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\core\handlers\base.py", line 253, in _get_response_async
+    response = await wrapped_callback(
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\asgiref\sync.py", line 435, in __call__
+    ret = await asyncio.wait_for(future, timeout=None)
+  File "D:\language\python38\lib\asyncio\tasks.py", line 455, in wait_for
+    return await fut
+  File "D:\language\python38\lib\concurrent\futures\thread.py", line 57, in run
+    result = self.fn(*self.args, **self.kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\asgiref\sync.py", line 476, in thread_handler
+    return func(*args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\views\decorators\csrf.py", line 54, in wrapped_view
+    return view_func(*args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\viewsets.py", line 125, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 509, in dispatch
+    response = self.handle_exception(exc)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 469, in handle_exception
+    self.raise_uncaught_exception(exc)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 480, in raise_uncaught_exception
+    raise exc
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 506, in dispatch
+    response = handler(request, *args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\mixins.py", line 56, in retrieve
+    return Response(serializer.data)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\serializers.py", line 555, in data
+    ret = super().data
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\serializers.py", line 253, in data
+    self._data = self.to_representation(self.instance)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\serializers.py", line 509, in to_representation
+    attribute = field.get_attribute(instance)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\fields.py", line 446, in get_attribute
+    return get_attribute(instance, self.source_attrs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\fields.py", line 101, in get_attribute
+    instance = instance()
+  File "D:\Document\code\vue\greater_wms\.\bin\models.py", line 76, in get_active_containers
+    return self.current_containers.filter(
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
+    return getattr(self.get_queryset(), name)(*args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\query.py", line 1420, in filter
+    return self._filter_or_exclude(False, args, kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\query.py", line 1438, in _filter_or_exclude
+    clone._filter_or_exclude_inplace(negate, args, kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\query.py", line 1445, in _filter_or_exclude_inplace
+    self._query.add_q(Q(*args, **kwargs))
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\sql\query.py", line 1532, in add_q
+    clause, _ = self._add_q(q_object, self.used_aliases)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\sql\query.py", line 1562, in _add_q
+    child_clause, needed_inner = self.build_filter(
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\sql\query.py", line 1407, in build_filter
+    lookups, parts, reffed_expression = self.solve_lookup_type(arg)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\sql\query.py", line 1217, in solve_lookup_type
+    _, field, _, lookup_parts = self.names_to_path(lookup_splitted, self.get_meta())
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\sql\query.py", line 1709, in names_to_path
+    raise FieldError(
+django.core.exceptions.FieldError: Cannot resolve keyword 'locationcontainerlink' into field. Choices are: allocation_history, available, container_code, current_location, details, id, last_operation, location_links, locationchangelog, locationmodel, operations, status, target_location
+[2025-05-20 22:37:04,814][django.request.log_response():241] [ERROR] Internal Server Error: /bin/667/
+Traceback (most recent call last):
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\asgiref\sync.py", line 472, in thread_handler
+    raise exc_info[1]
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\core\handlers\exception.py", line 42, in inner
+    response = await get_response(request)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\core\handlers\base.py", line 253, in _get_response_async
+    response = await wrapped_callback(
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\asgiref\sync.py", line 435, in __call__
+    ret = await asyncio.wait_for(future, timeout=None)
+  File "D:\language\python38\lib\asyncio\tasks.py", line 455, in wait_for
+    return await fut
+  File "D:\language\python38\lib\concurrent\futures\thread.py", line 57, in run
+    result = self.fn(*self.args, **self.kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\asgiref\sync.py", line 476, in thread_handler
+    return func(*args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\views\decorators\csrf.py", line 54, in wrapped_view
+    return view_func(*args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\viewsets.py", line 125, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 509, in dispatch
+    response = self.handle_exception(exc)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 469, in handle_exception
+    self.raise_uncaught_exception(exc)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 480, in raise_uncaught_exception
+    raise exc
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 506, in dispatch
+    response = handler(request, *args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\mixins.py", line 56, in retrieve
+    return Response(serializer.data)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\serializers.py", line 555, in data
+    ret = super().data
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\serializers.py", line 253, in data
+    self._data = self.to_representation(self.instance)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\serializers.py", line 509, in to_representation
+    attribute = field.get_attribute(instance)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\fields.py", line 446, in get_attribute
+    return get_attribute(instance, self.source_attrs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\fields.py", line 101, in get_attribute
+    instance = instance()
+  File "D:\Document\code\vue\greater_wms\.\bin\models.py", line 76, in get_active_containers
+    return self.current_containers.filter(
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
+    return getattr(self.get_queryset(), name)(*args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\query.py", line 1420, in filter
+    return self._filter_or_exclude(False, args, kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\query.py", line 1438, in _filter_or_exclude
+    clone._filter_or_exclude_inplace(negate, args, kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\query.py", line 1445, in _filter_or_exclude_inplace
+    self._query.add_q(Q(*args, **kwargs))
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\sql\query.py", line 1532, in add_q
+    clause, _ = self._add_q(q_object, self.used_aliases)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\sql\query.py", line 1562, in _add_q
+    child_clause, needed_inner = self.build_filter(
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\sql\query.py", line 1407, in build_filter
+    lookups, parts, reffed_expression = self.solve_lookup_type(arg)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\sql\query.py", line 1217, in solve_lookup_type
+    _, field, _, lookup_parts = self.names_to_path(lookup_splitted, self.get_meta())
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\sql\query.py", line 1709, in names_to_path
+    raise FieldError(
+django.core.exceptions.FieldError: Cannot resolve keyword 'is_active' into field. Choices are: allocation_history, available, container_code, current_location, details, id, last_operation, location_links, locationchangelog, locationmodel, operations, status, target_location

+ 272 - 0
logs/server.log

@@ -24437,3 +24437,275 @@ Traceback (most recent call last):
   File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\query.py", line 2272, in prefetch_related_objects
     raise AttributeError(
 AttributeError: Cannot find 'container_links' on LocationModel object, 'container_links' is an invalid parameter to prefetch_related()
+[2025-05-20 09:27:51,899][django.server.log_message():187] [INFO] "OPTIONS /staff/?staff_name=1 HTTP/1.1" 200 0
+[2025-05-20 09:27:51,901][django.server.log_message():187] [INFO] "OPTIONS /warehouse/multiple/?max_page=30 HTTP/1.1" 200 0
+[2025-05-20 09:27:51,934][django.server.log_message():187] [INFO] "GET /warehouse/multiple/?max_page=30 HTTP/1.1" 200 371
+[2025-05-20 09:27:51,959][django.server.log_message():187] [INFO] "GET /staff/?staff_name=1 HTTP/1.1" 200 307
+[2025-05-20 09:27:55,870][django.server.log_message():187] [INFO] "OPTIONS /bin/?layer=1&warehouse_code=W01&max_page=1000&shelf_name=A%E5%8C%BA%E8%B4%A7%E6%9E%B6 HTTP/1.1" 200 0
+[2025-05-20 09:27:56,372][django.server.log_message():187] [INFO] "GET /bin/?layer=1&warehouse_code=W01&max_page=1000&shelf_name=A%E5%8C%BA%E8%B4%A7%E6%9E%B6 HTTP/1.1" 200 169231
+[2025-05-20 09:28:11,744][django.server.log_message():187] [INFO] "OPTIONS /warehouse/boundcodetype/ HTTP/1.1" 200 0
+[2025-05-20 09:28:11,744][django.server.log_message():187] [INFO] "OPTIONS /bound/list/?page=1&base_type=1&page_size=11 HTTP/1.1" 200 0
+[2025-05-20 09:28:11,744][django.server.log_message():187] [INFO] "OPTIONS /warehouse/boundtype/ HTTP/1.1" 200 0
+[2025-05-20 09:28:11,746][django.server.log_message():187] [INFO] "OPTIONS /warehouse/boundbusiness/ HTTP/1.1" 200 0
+[2025-05-20 09:28:11,747][django.server.log_message():187] [INFO] "OPTIONS /warehouse/department/ HTTP/1.1" 200 0
+[2025-05-20 09:28:11,751][django.server.log_message():187] [INFO] "OPTIONS /warehouse/status/ HTTP/1.1" 200 0
+[2025-05-20 09:28:11,793][django.server.log_message():187] [INFO] "GET /warehouse/boundcodetype/ HTTP/1.1" 200 250
+[2025-05-20 09:28:11,860][django.server.log_message():187] [INFO] "GET /warehouse/boundtype/ HTTP/1.1" 200 233
+[2025-05-20 09:28:11,871][django.server.log_message():187] [INFO] "GET /bound/list/?page=1&base_type=1&page_size=11 HTTP/1.1" 200 453
+[2025-05-20 09:28:11,891][django.server.log_message():187] [INFO] "GET /warehouse/boundbusiness/ HTTP/1.1" 200 229
+[2025-05-20 09:28:11,916][django.server.log_message():187] [INFO] "GET /warehouse/status/ HTTP/1.1" 200 600
+[2025-05-20 09:28:11,938][django.server.log_message():187] [INFO] "GET /warehouse/department/ HTTP/1.1" 200 2858
+[2025-05-20 09:28:13,526][django.server.log_message():187] [INFO] "OPTIONS /container/list/?page=1&page_size=11 HTTP/1.1" 200 0
+[2025-05-20 09:28:13,567][django.server.log_message():187] [INFO] "GET /container/list/?page=1&page_size=11 HTTP/1.1" 200 679
+[2025-05-20 09:30:07,283][django.server.log_message():187] [INFO] "POST /container/detail/ HTTP/1.1" 200 196
+[2025-05-20 09:30:13,519][django.server.log_message():187] [INFO] "GET /container/list/?page=1&page_size=11 HTTP/1.1" 200 827
+[2025-05-20 09:30:20,591][django.server.log_message():187] [INFO] "OPTIONS /container/detail/?status__lte=2&container=5 HTTP/1.1" 200 0
+[2025-05-20 09:30:20,591][django.server.log_message():187] [INFO] "OPTIONS /container/operate/?status=1&container=5 HTTP/1.1" 200 0
+[2025-05-20 09:30:20,635][django.server.log_message():187] [INFO] "GET /container/operate/?status=1&container=5 HTTP/1.1" 200 720
+[2025-05-20 09:30:20,653][django.server.log_message():187] [INFO] "GET /container/detail/?status__lte=2&container=5 HTTP/1.1" 200 636
+[2025-05-20 09:30:41,924][django.server.log_message():187] [INFO] "POST /container/detail/ HTTP/1.1" 200 144
+[2025-05-20 09:30:47,006][django.server.log_message():187] [INFO] "GET /container/list/?page=1&page_size=11 HTTP/1.1" 200 966
+[2025-05-20 09:30:49,707][django.server.log_message():187] [INFO] "OPTIONS /container/detail/?status__lte=2&container=6 HTTP/1.1" 200 0
+[2025-05-20 09:30:49,707][django.server.log_message():187] [INFO] "OPTIONS /container/operate/?status=1&container=6 HTTP/1.1" 200 0
+[2025-05-20 09:30:49,740][django.server.log_message():187] [INFO] "GET /container/detail/?status__lte=2&container=6 HTTP/1.1" 200 52
+[2025-05-20 09:30:49,754][django.server.log_message():187] [INFO] "GET /container/operate/?status=1&container=6 HTTP/1.1" 200 52
+[2025-05-20 09:30:56,000][django.server.log_message():187] [INFO] "GET /container/detail/?status__lte=2&container=6 HTTP/1.1" 200 52
+[2025-05-20 09:30:56,009][django.server.log_message():187] [INFO] "GET /container/operate/?status=1&container=6 HTTP/1.1" 200 52
+[2025-05-20 09:31:16,770][django.server.log_message():187] [INFO] "GET /container/detail/?status__lte=2&container=6 HTTP/1.1" 200 52
+[2025-05-20 09:31:16,787][django.server.log_message():187] [INFO] "GET /container/operate/?status=1&container=6 HTTP/1.1" 200 52
+[2025-05-20 09:31:22,236][django.server.log_message():187] [INFO] "OPTIONS /bound/list/?page=1&base_type=0&page_size=11 HTTP/1.1" 200 0
+[2025-05-20 09:31:22,279][django.server.log_message():187] [INFO] "GET /warehouse/boundcodetype/ HTTP/1.1" 200 250
+[2025-05-20 09:31:22,294][django.server.log_message():187] [INFO] "GET /warehouse/boundtype/ HTTP/1.1" 200 233
+[2025-05-20 09:31:22,327][django.server.log_message():187] [INFO] "GET /warehouse/status/ HTTP/1.1" 200 600
+[2025-05-20 09:31:22,331][django.server.log_message():187] [INFO] "OPTIONS /warehouse/department/?max_page=1000 HTTP/1.1" 200 0
+[2025-05-20 09:31:22,346][django.server.log_message():187] [INFO] "GET /warehouse/boundbusiness/ HTTP/1.1" 200 229
+[2025-05-20 09:31:22,471][django.server.log_message():187] [INFO] "GET /bound/list/?page=1&base_type=0&page_size=11 HTTP/1.1" 200 452
+[2025-05-20 09:31:22,491][django.server.log_message():187] [INFO] "GET /warehouse/department/?max_page=1000 HTTP/1.1" 200 9376
+[2025-05-20 09:32:14,680][django.server.log_message():187] [INFO] "GET /warehouse/boundbusiness/ HTTP/1.1" 200 229
+[2025-05-20 09:32:14,803][django.server.log_message():187] [INFO] "GET /warehouse/department/ HTTP/1.1" 200 2858
+[2025-05-20 09:32:14,803][django.server.log_message():187] [INFO] "GET /warehouse/status/ HTTP/1.1" 200 600
+[2025-05-20 09:32:14,803][django.server.log_message():187] [INFO] "GET /bound/list/?page=1&base_type=1&page_size=11 HTTP/1.1" 200 453
+[2025-05-20 09:32:14,845][django.server.log_message():187] [INFO] "GET /warehouse/boundcodetype/ HTTP/1.1" 200 250
+[2025-05-20 09:32:14,858][django.server.log_message():187] [INFO] "GET /warehouse/boundtype/ HTTP/1.1" 200 233
+[2025-05-20 09:32:17,912][django.server.log_message():187] [INFO] "OPTIONS /container/out_task/ HTTP/1.1" 200 0
+[2025-05-20 09:55:45,182][django.server.log_message():187] [INFO] "POST /container/out_task/ HTTP/1.1" 200 30
+[2025-05-20 09:55:45,277][django.server.log_message():187] [INFO] "GET /bound/list/?page=1&base_type=1&page_size=11 HTTP/1.1" 200 453
+[2025-05-20 10:29:21,670][django.server.log_message():187] [INFO] "POST /container/out_task/ HTTP/1.1" 200 30
+[2025-05-20 10:29:21,735][django.server.log_message():187] [INFO] "GET /bound/list/?page=1&base_type=1&page_size=11 HTTP/1.1" 200 453
+[2025-05-20 11:16:17,380][django.server.log_message():187] [INFO] "GET /warehouse/boundcodetype/ HTTP/1.1" 200 250
+[2025-05-20 11:16:17,444][django.server.log_message():187] [INFO] "GET /warehouse/boundtype/ HTTP/1.1" 200 233
+[2025-05-20 11:16:17,511][django.server.log_message():187] [INFO] "GET /warehouse/boundbusiness/ HTTP/1.1" 200 229
+[2025-05-20 11:16:17,578][django.server.log_message():187] [INFO] "GET /warehouse/status/ HTTP/1.1" 200 600
+[2025-05-20 11:16:17,711][django.server.log_message():187] [INFO] "GET /warehouse/department/?max_page=1000 HTTP/1.1" 200 9376
+[2025-05-20 11:16:17,795][django.server.log_message():187] [INFO] "GET /bound/list/?page=1&base_type=0&page_size=11 HTTP/1.1" 200 452
+[2025-05-20 11:16:19,952][django.server.log_message():187] [INFO] "OPTIONS /bound/detail/?bound_list=1 HTTP/1.1" 200 0
+[2025-05-20 11:16:19,952][django.server.log_message():187] [INFO] "OPTIONS /bound/list/1/ HTTP/1.1" 200 0
+[2025-05-20 11:16:20,475][django.server.log_message():187] [INFO] "GET /bound/list/1/ HTTP/1.1" 200 400
+[2025-05-20 11:16:20,547][django.server.log_message():187] [INFO] "GET /bound/detail/?bound_list=1 HTTP/1.1" 200 3571
+[2025-05-20 11:32:06,997][django.request.log_response():241] [ERROR] Internal Server Error: /bound/detail/
+Traceback (most recent call last):
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\asgiref\sync.py", line 472, in thread_handler
+    raise exc_info[1]
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\core\handlers\exception.py", line 42, in inner
+    response = await get_response(request)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\core\handlers\base.py", line 253, in _get_response_async
+    response = await wrapped_callback(
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\asgiref\sync.py", line 435, in __call__
+    ret = await asyncio.wait_for(future, timeout=None)
+  File "D:\language\python38\lib\asyncio\tasks.py", line 455, in wait_for
+    return await fut
+  File "D:\language\python38\lib\concurrent\futures\thread.py", line 57, in run
+    result = self.fn(*self.args, **self.kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\asgiref\sync.py", line 476, in thread_handler
+    return func(*args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\views\decorators\csrf.py", line 54, in wrapped_view
+    return view_func(*args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\viewsets.py", line 125, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 509, in dispatch
+    response = self.handle_exception(exc)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 469, in handle_exception
+    self.raise_uncaught_exception(exc)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 480, in raise_uncaught_exception
+    raise exc
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 506, in dispatch
+    response = handler(request, *args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.\bound\views.py", line 650, in create
+    data['detail_code'] = f"DC-{data['bound_list']:02}{data['bound_batch']:02}"
+KeyError: 'bound_list'
+[2025-05-20 12:30:48,128][django.request.log_response():241] [ERROR] Internal Server Error: /container/container_wcs/
+[2025-05-20 14:03:20,733][django.request.log_response():241] [WARNING] Not Found: /stock/list/
+[2025-05-20 14:03:37,543][django.request.log_response():241] [WARNING] Not Found: /stock/list/
+[2025-05-20 14:03:52,015][django.request.log_response():241] [WARNING] Not Found: /stock/list/
+[2025-05-20 14:03:57,434][django.request.log_response():241] [WARNING] Not Found: /stock/list/
+[2025-05-20 14:04:11,105][django.request.log_response():241] [WARNING] Not Found: /cyclecount/manualcyclecount/
+[2025-05-20 14:40:22,570][django.request.log_response():241] [WARNING] Bad Request: /container/container_wcs/update/
+[2025-05-20 22:21:17,214][django.request.log_response():241] [ERROR] Internal Server Error: /bin/667/
+Traceback (most recent call last):
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\asgiref\sync.py", line 472, in thread_handler
+    raise exc_info[1]
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\core\handlers\exception.py", line 42, in inner
+    response = await get_response(request)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\core\handlers\base.py", line 253, in _get_response_async
+    response = await wrapped_callback(
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\asgiref\sync.py", line 435, in __call__
+    ret = await asyncio.wait_for(future, timeout=None)
+  File "D:\language\python38\lib\asyncio\tasks.py", line 455, in wait_for
+    return await fut
+  File "D:\language\python38\lib\concurrent\futures\thread.py", line 57, in run
+    result = self.fn(*self.args, **self.kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\asgiref\sync.py", line 476, in thread_handler
+    return func(*args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\views\decorators\csrf.py", line 54, in wrapped_view
+    return view_func(*args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\viewsets.py", line 125, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 509, in dispatch
+    response = self.handle_exception(exc)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 469, in handle_exception
+    self.raise_uncaught_exception(exc)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 480, in raise_uncaught_exception
+    raise exc
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 506, in dispatch
+    response = handler(request, *args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\mixins.py", line 56, in retrieve
+    return Response(serializer.data)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\serializers.py", line 555, in data
+    ret = super().data
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\serializers.py", line 253, in data
+    self._data = self.to_representation(self.instance)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\serializers.py", line 507, in to_representation
+    for field in fields:
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\serializers.py", line 368, in _readable_fields
+    for field in self.fields.values():
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\utils\functional.py", line 57, in __get__
+    res = instance.__dict__[self.name] = self.func(instance)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\serializers.py", line 357, in fields
+    fields[key] = value
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\utils\serializer_helpers.py", line 169, in __setitem__
+    field.bind(field_name=key, parent=self.serializer)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\fields.py", line 367, in bind
+    assert self.source != field_name, (
+AssertionError: It is redundant to specify `source='current_containers'` on field 'ListSerializer' in serializer 'LocationListSerializer', because it is the same as the field name. Remove the `source` keyword argument.
+[2025-05-20 22:35:37,288][django.request.log_response():241] [ERROR] Internal Server Error: /bin/667/
+Traceback (most recent call last):
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\asgiref\sync.py", line 472, in thread_handler
+    raise exc_info[1]
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\core\handlers\exception.py", line 42, in inner
+    response = await get_response(request)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\core\handlers\base.py", line 253, in _get_response_async
+    response = await wrapped_callback(
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\asgiref\sync.py", line 435, in __call__
+    ret = await asyncio.wait_for(future, timeout=None)
+  File "D:\language\python38\lib\asyncio\tasks.py", line 455, in wait_for
+    return await fut
+  File "D:\language\python38\lib\concurrent\futures\thread.py", line 57, in run
+    result = self.fn(*self.args, **self.kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\asgiref\sync.py", line 476, in thread_handler
+    return func(*args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\views\decorators\csrf.py", line 54, in wrapped_view
+    return view_func(*args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\viewsets.py", line 125, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 509, in dispatch
+    response = self.handle_exception(exc)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 469, in handle_exception
+    self.raise_uncaught_exception(exc)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 480, in raise_uncaught_exception
+    raise exc
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 506, in dispatch
+    response = handler(request, *args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\mixins.py", line 56, in retrieve
+    return Response(serializer.data)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\serializers.py", line 555, in data
+    ret = super().data
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\serializers.py", line 253, in data
+    self._data = self.to_representation(self.instance)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\serializers.py", line 509, in to_representation
+    attribute = field.get_attribute(instance)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\fields.py", line 446, in get_attribute
+    return get_attribute(instance, self.source_attrs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\fields.py", line 101, in get_attribute
+    instance = instance()
+  File "D:\Document\code\vue\greater_wms\.\bin\models.py", line 76, in get_active_containers
+    return self.current_containers.filter(
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
+    return getattr(self.get_queryset(), name)(*args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\query.py", line 1420, in filter
+    return self._filter_or_exclude(False, args, kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\query.py", line 1438, in _filter_or_exclude
+    clone._filter_or_exclude_inplace(negate, args, kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\query.py", line 1445, in _filter_or_exclude_inplace
+    self._query.add_q(Q(*args, **kwargs))
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\sql\query.py", line 1532, in add_q
+    clause, _ = self._add_q(q_object, self.used_aliases)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\sql\query.py", line 1562, in _add_q
+    child_clause, needed_inner = self.build_filter(
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\sql\query.py", line 1407, in build_filter
+    lookups, parts, reffed_expression = self.solve_lookup_type(arg)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\sql\query.py", line 1217, in solve_lookup_type
+    _, field, _, lookup_parts = self.names_to_path(lookup_splitted, self.get_meta())
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\sql\query.py", line 1709, in names_to_path
+    raise FieldError(
+django.core.exceptions.FieldError: Cannot resolve keyword 'locationcontainerlink' into field. Choices are: allocation_history, available, container_code, current_location, details, id, last_operation, location_links, locationchangelog, locationmodel, operations, status, target_location
+[2025-05-20 22:37:04,814][django.request.log_response():241] [ERROR] Internal Server Error: /bin/667/
+Traceback (most recent call last):
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\asgiref\sync.py", line 472, in thread_handler
+    raise exc_info[1]
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\core\handlers\exception.py", line 42, in inner
+    response = await get_response(request)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\core\handlers\base.py", line 253, in _get_response_async
+    response = await wrapped_callback(
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\asgiref\sync.py", line 435, in __call__
+    ret = await asyncio.wait_for(future, timeout=None)
+  File "D:\language\python38\lib\asyncio\tasks.py", line 455, in wait_for
+    return await fut
+  File "D:\language\python38\lib\concurrent\futures\thread.py", line 57, in run
+    result = self.fn(*self.args, **self.kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\asgiref\sync.py", line 476, in thread_handler
+    return func(*args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\views\decorators\csrf.py", line 54, in wrapped_view
+    return view_func(*args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\viewsets.py", line 125, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 509, in dispatch
+    response = self.handle_exception(exc)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 469, in handle_exception
+    self.raise_uncaught_exception(exc)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 480, in raise_uncaught_exception
+    raise exc
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\views.py", line 506, in dispatch
+    response = handler(request, *args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\mixins.py", line 56, in retrieve
+    return Response(serializer.data)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\serializers.py", line 555, in data
+    ret = super().data
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\serializers.py", line 253, in data
+    self._data = self.to_representation(self.instance)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\serializers.py", line 509, in to_representation
+    attribute = field.get_attribute(instance)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\fields.py", line 446, in get_attribute
+    return get_attribute(instance, self.source_attrs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\rest_framework\fields.py", line 101, in get_attribute
+    instance = instance()
+  File "D:\Document\code\vue\greater_wms\.\bin\models.py", line 76, in get_active_containers
+    return self.current_containers.filter(
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
+    return getattr(self.get_queryset(), name)(*args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\query.py", line 1420, in filter
+    return self._filter_or_exclude(False, args, kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\query.py", line 1438, in _filter_or_exclude
+    clone._filter_or_exclude_inplace(negate, args, kwargs)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\query.py", line 1445, in _filter_or_exclude_inplace
+    self._query.add_q(Q(*args, **kwargs))
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\sql\query.py", line 1532, in add_q
+    clause, _ = self._add_q(q_object, self.used_aliases)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\sql\query.py", line 1562, in _add_q
+    child_clause, needed_inner = self.build_filter(
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\sql\query.py", line 1407, in build_filter
+    lookups, parts, reffed_expression = self.solve_lookup_type(arg)
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\sql\query.py", line 1217, in solve_lookup_type
+    _, field, _, lookup_parts = self.names_to_path(lookup_splitted, self.get_meta())
+  File "D:\Document\code\vue\greater_wms\.venv\lib\site-packages\django\db\models\sql\query.py", line 1709, in names_to_path
+    raise FieldError(
+django.core.exceptions.FieldError: Cannot resolve keyword 'is_active' into field. Choices are: allocation_history, available, container_code, current_location, details, id, last_operation, location_links, locationchangelog, locationmodel, operations, status, target_location

+ 503 - 258
templates/src/components/goodscard.vue

@@ -1,237 +1,459 @@
 <template>
-    <div  :style="{ backgroundColor: bgColor }">
-
-        <q-dialog v-model="storage_dialog" transition-show="jump-down" transition-hide="jump-up" @show=prepareDialog()>
-            <q-card style="min-width: 600px; ">
-                <q-bar class="bg-light-blue-10 text-white rounded-borders" style="height: 50px">
-                    <div>
-                        {{ $t("stock.shelf.shelf_details")  }} {{ rowIndex }}-{{ colIndex }}-{{layerIndex}}
-                    </div>
-                    <q-space></q-space>
-                    <q-btn dense flat icon="close" v-close-popup>
-                        <q-tooltip content-class="bg-amber text-black shadow-4" :offset="[20, 20]"
-                            content-style="font-size: 12px">
-                            {{ $t("index.close") }}</q-tooltip>
-                    </q-btn>
-                </q-bar>
-                <q-card-section class="q-pt-md ">
-                    <q-tabs v-model="activeTab">
-                        <q-tab name="tab1" label="货架属性" />
-                        <q-tab name="tab2" label="批次信息" />
-                        <q-tab name="tab3" label="库存明细" />
-                    </q-tabs>
-                </q-card-section>
-                <!-- 选项卡内容 -->
-                <q-tab-panels v-model="activeTab" animated>
-                    <q-tab-panel name="tab1" style="height:300px">
-                        <div class="row q-gutter-x-md">
-                            <div class="col column q-gutter-y-md">
-
-                                <q-input dense outlined square v-model="storage_form.goods_code"
-                                    :label="$t('stock.shelf.goods_code')" :readonly="onlyread"
-                                    :rules="[val => val?.length > 0 || error1]" />
-
-                            </div>
-                            <div class="col column q-gutter-y-md">
-
-                                <q-input dense outlined square v-model="storage_form.goods_name"
-                                    :label="$t('stock.shelf.goods_name')" :readonly="onlyread"
-                                    :rules="[val => val?.length > 0 || error1]" />
-
-                            </div>
-                        </div>
-
-                    </q-tab-panel>
-                    <q-tab-panel name="tab2" style="height:300px">
-                        <div class="row q-gutter-x-md">
-                            <div class="col column q-gutter-y-md">
-                                <q-input dense outlined square v-model="storage_form.goods_code"
-                                    :label="$t('stock.shelf.goods_code')" :readonly="onlyread"
-                                    :rules="[val => val?.length > 0 || error1]" />
-                                <q-input dense outlined square v-model="storage_form.goods_batch"
-                                    :label="$t('stock.shelf.goods_batch')" :readonly="onlyread"
-                                    :rules="[val => val?.length > 0 || error1]" />
-
-                                <q-input dense outlined square v-model="storage_form.goods_qty"
-                                    :label="'批次总数'" :readonly="onlyread"
-                                    :rules="[val => val >= 0 || error1]" class="col" />
-
-                                <q-input dense outlined square v-model="storage_form.goods_desc"
-                                    :label="$t('stock.shelf.goods_desc')" :readonly="onlyread"
-                                    :rules="[val => val?.length > 0 || error1]" />
-
-                            </div>
-                            <div class="col column q-gutter-y-md">
-                                <q-input dense outlined square v-model="storage_form.goods_name"
-                                    :label="$t('stock.shelf.goods_name')" :readonly="onlyread"
-                                    :rules="[val => val?.length > 0 || error1]" />
-                                <q-input dense outlined square v-model="storage_form.goods_std"
-                                    :label="$t('stock.shelf.goods_std')" :readonly="onlyread"
-                                    :rules="[val => val?.length > 0 || error1]" />
-
-                                <q-input dense outlined square v-model="storage_form.goods_notes"
-                                    :label="'库位容纳'" :readonly="onlyread"
-                                    :rules="[val => val >= 0 || error1]" class="col" />
-
-                                <q-input dense outlined square v-model="storage_form.goods_unit"
-                                    :label="$t('stock.shelf.goods_unit')" :readonly="onlyread"
-                                    :rules="[val => val?.length > 0 || error1]" />
-
-                            </div>
-                        </div>
-                    </q-tab-panel>
-                    <q-tab-panel name="tab3" style="height:300px">
-                        <div class="row q-gutter-x-md">
-                            <div class="col column q-gutter-y-md">
-                            </div>
-                            <div class="col column q-gutter-y-md"></div>
-                        </div>
-                    </q-tab-panel>
-                </q-tab-panels>
-                <div style="position: absolute; right: 20px; bottom: 12px; z-index: 100">
-                    <q-btn-group push>
-                        <q-btn color="white" text-color="black" @click="shelfLocal = 'undefined'; handleclick()">
-                            {{ $t('stock.return') }}
-                        </q-btn>
-                        <q-btn color="white" text-color="black" @click="showInventoryDetails = !showInventoryDetails">
-                            {{ $t('stock.details') }}
-                        </q-btn>
-                        <q-btn color="primary" text-color="white" @click=handleEdit()>
-                            {{ onlyread ? $t('stock.shelf.shelf_edit') : $t("stock.shelf.shelf_confirm") }}
-                        </q-btn>
-                    </q-btn-group>
+  <div :style="{ backgroundColor: bgColor }">
+    <q-dialog
+      v-model="storage_dialog"
+      transition-show="jump-down"
+      transition-hide="jump-up"
+      @show="prepareDialog()"
+    >
+      <q-card style="min-width: 600px">
+        <q-bar
+          class="bg-light-blue-10 text-white rounded-borders"
+          style="height: 50px"
+        >
+          <div>
+            {{ $t("stock.shelf.shelf_details") }} {{ rowIndex }}-{{
+              colIndex
+            }}-{{ layerIndex }}
+          </div>
+          <q-space></q-space>
+          <q-btn dense flat icon="close" v-close-popup>
+            <q-tooltip
+              content-class="bg-amber text-black shadow-4"
+              :offset="[20, 20]"
+              content-style="font-size: 12px"
+            >
+              {{ $t("index.close") }}</q-tooltip
+            >
+          </q-btn>
+        </q-bar>
+        <q-card-section class="q-pt-md">
+          <q-tabs v-model="activeTab">
+            <q-tab name="tab1" label="货架属性" />
+            <q-tab name="tab2" label="批次信息" />
+            <q-tab name="tab3" label="库存明细" />
+          </q-tabs>
+        </q-card-section>
+        <!-- 选项卡内容 -->
+        <q-tab-panels v-model="activeTab" animated>
+          <q-tab-panel name="tab1" style="height: 300px">
+            <div class="row q-gutter-x-md">
+              <div class="col column q-gutter-y-md">
+                <q-input
+                  dense
+                  outlined
+                  square
+                  v-model="storage_form.goods_code"
+                  :label="$t('stock.shelf.goods_code')"
+                  :readonly="onlyread"
+                  :rules="[(val) => val?.length > 0 || error1]"
+                />
+              </div>
+              <div class="col column q-gutter-y-md">
+                <q-input
+                  dense
+                  outlined
+                  square
+                  v-model="storage_form.goods_name"
+                  :label="$t('stock.shelf.goods_name')"
+                  :readonly="onlyread"
+                  :rules="[(val) => val?.length > 0 || error1]"
+                />
+              </div>
+            </div>
+          </q-tab-panel>
+          <q-tab-panel name="tab2" style="height: 300px">
+            <div class="row q-gutter-x-md">
+              <div class="col column q-gutter-y-md">
+                <q-input
+                  dense
+                  outlined
+                  square
+                  v-model="storage_form.goods_code"
+                  :label="$t('stock.shelf.goods_code')"
+                  :readonly="onlyread"
+                  :rules="[(val) => val?.length > 0 || error1]"
+                />
+                <q-input
+                  dense
+                  outlined
+                  square
+                  v-model="storage_form.goods_batch"
+                  :label="$t('stock.shelf.goods_batch')"
+                  :readonly="onlyread"
+                  :rules="[(val) => val?.length > 0 || error1]"
+                />
+
+                <q-input
+                  dense
+                  outlined
+                  square
+                  v-model="storage_form.goods_qty"
+                  :label="'批次总数'"
+                  :readonly="onlyread"
+                  :rules="[(val) => val >= 0 || error1]"
+                  class="col"
+                />
+
+                <q-input
+                  dense
+                  outlined
+                  square
+                  v-model="storage_form.goods_desc"
+                  :label="$t('stock.shelf.goods_desc')"
+                  :readonly="onlyread"
+                  :rules="[(val) => val?.length > 0 || error1]"
+                />
+              </div>
+              <div class="col column q-gutter-y-md">
+                <q-input
+                  dense
+                  outlined
+                  square
+                  v-model="storage_form.goods_name"
+                  :label="$t('stock.shelf.goods_name')"
+                  :readonly="onlyread"
+                  :rules="[(val) => val?.length > 0 || error1]"
+                />
+                <q-input
+                  dense
+                  outlined
+                  square
+                  v-model="storage_form.goods_std"
+                  :label="$t('stock.shelf.goods_std')"
+                  :readonly="onlyread"
+                  :rules="[(val) => val?.length > 0 || error1]"
+                />
+
+                <q-input
+                  dense
+                  outlined
+                  square
+                  v-model="storage_form.goods_notes"
+                  :label="'库位容纳'"
+                  :readonly="onlyread"
+                  :rules="[(val) => val >= 0 || error1]"
+                  class="col"
+                />
+
+                <q-input
+                  dense
+                  outlined
+                  square
+                  v-model="storage_form.goods_unit"
+                  :label="$t('stock.shelf.goods_unit')"
+                  :readonly="onlyread"
+                  :rules="[(val) => val?.length > 0 || error1]"
+                />
+              </div>
+            </div>
+          </q-tab-panel>
+          <q-tab-panel name="tab3" style="height: 300px">
+            <div class="row q-gutter-x-md">
+              <div class="col column q-gutter-y-md"></div>
+              <div class="col column q-gutter-y-md"></div>
+            </div>
+          </q-tab-panel>
+        </q-tab-panels>
+        <div
+          style="position: absolute; right: 20px; bottom: 12px; z-index: 100"
+        >
+          <q-btn-group push>
+            <q-btn
+              color="white"
+              text-color="black"
+              @click="
+                shelfLocal = 'undefined';
+                handleclick();
+              "
+            >
+              {{ $t("stock.return") }}
+            </q-btn>
+            <q-btn
+              color="white"
+              text-color="black"
+              @click="showInventoryDetails = !showInventoryDetails"
+            >
+              {{ $t("stock.details") }}
+            </q-btn>
+            <q-btn color="primary" text-color="white" @click="handleEdit()">
+              {{
+                onlyread
+                  ? $t("stock.shelf.shelf_edit")
+                  : $t("stock.shelf.shelf_confirm")
+              }}
+            </q-btn>
+          </q-btn-group>
+        </div>
+
+        <div
+          style="float: right; padding: 15px 15px 50px 15px; min-width: 100%"
+          flow="row wrap"
+        >
+          <q-card class="q-mb-md" bordered v-if="showInventoryDetails">
+            <q-card-actions
+              class="q-px-none"
+              style="position: absolute; right: 20px; top: 10px; z-index: 100"
+            >
+              <q-btn
+                v-if="!onlyread"
+                @click="addInventoryDetail()"
+                icon="add"
+                flat
+                dense
+                color="primary"
+                :label="$t('stock.add')"
+              />
+              <q-btn
+                v-if="!onlyread"
+                @click="deleteInventoryDetail()"
+                icon="delete"
+                flat
+                dense
+                color="primary"
+                :label="$t('stock.delete')"
+              />
+            </q-card-actions>
+            <q-card-section>
+              <div class="text-h6 q-mb-md">
+                {{ $t("stock.inventory_details") }}
+              </div>
+
+              <!-- 动态生成的输入行 -->
+              <div
+                v-for="(detail, index) in inventoryDetails"
+                :key="index"
+                class="row q-col-gutter-md q-mb-sm"
+              >
+                <div class="col">
+                  <q-input
+                    v-model="detail.id"
+                    :label="$t('stock.batch')"
+                    :readonly="onlyread"
+                    dense
+                    outlined
+                  />
                 </div>
-
-                <div style="float: right; padding: 15px 15px 50px 15px ;min-width: 100%" flow="row wrap">
-                    <q-card class="q-mb-md" bordered v-if="showInventoryDetails">
-                        <q-card-actions class="q-px-none"
-                            style="position: absolute; right: 20px; top: 10px; z-index: 100">
-                            <q-btn v-if="!onlyread" @click=addInventoryDetail() icon="add" flat dense color="primary"
-                                :label="$t('stock.add')" />
-                            <q-btn v-if="!onlyread" @click=deleteInventoryDetail() icon="delete" flat dense
-                                color="primary" :label="$t('stock.delete')" />
-                        </q-card-actions>
-                        <q-card-section>
-
-                            <div class="text-h6 q-mb-md">{{ $t('stock.inventory_details') }}</div>
-
-                            <!-- 动态生成的输入行 -->
-                            <div v-for="(detail, index) in inventoryDetails" :key="index"
-                                class="row q-col-gutter-md q-mb-sm">
-                                <div class="col">
-                                    <q-input v-model="detail.id" :label="$t('stock.batch')" :readonly="onlyread" dense
-                                        outlined />
-                                </div>
-                                <div class="col">
-                                    <q-input v-model="detail.quantity" :label="$t('stock.quantity')"
-                                        :readonly="onlyread" type="number" dense outlined />
-                                </div>
-                                <div class="col">
-                                    <q-input v-model="detail.location" :label="$t('stock.location')"
-                                        :readonly="onlyread" dense standout outlined />
-                                </div>
-                            </div>
-                        </q-card-section>
-                    </q-card>
+                <div class="col">
+                  <q-input
+                    v-model="detail.quantity"
+                    :label="$t('stock.quantity')"
+                    :readonly="onlyread"
+                    type="number"
+                    dense
+                    outlined
+                  />
                 </div>
-            </q-card>
-        </q-dialog>
-        <q-dialog v-model="elevator_dialog" transition-show="jump-down" transition-hide="jump-up" @show=prepareDialog()>
-            <q-card style="min-width: 350px;">
-                <q-bar class="bg-light-blue-10 text-white rounded-borders" style="height: 50px">
-                    <div>
-                        {{ $t("stock.elevator.elevator") }}
-                    </div>
-                    <q-space></q-space>
-                    <q-btn dense flat icon="close" v-close-popup>
-                        <q-tooltip content-class="bg-amber text-black shadow-4" :offset="[20, 20]"
-                            content-style="font-size: 12px">
-                            {{ $t("index.close") }}</q-tooltip>
-                    </q-btn>
-                </q-bar>
-                <q-card-section class="q-pt-md">
-                    <q-input dense outlined square v-model="elevator_form.ip" :label="$t('stock.elevator.ip')"
-                        :readonly="onlyread" :rules="[val => val?.length > 0 || error1]" />
-                    <q-input dense outlined square v-model="elevator_form.port" :label="$t('stock.elevator.port')"
-                        type="number" :readonly="onlyread" :rules="[
-                            val => val !== null || error1,
-                            val => val >= 0 || error1,
-                        ]" />
-                    <q-input dense outlined square v-model="elevator_form.status" :label="$t('stock.conveyor.status')"
-                        :readonly="onlyread" :rules="[val => val?.length > 0 || error1]" />
-                    <!-- <q-input dense outlined square v-model="elevator_form.password"
+                <div class="col">
+                  <q-input
+                    v-model="detail.location"
+                    :label="$t('stock.location')"
+                    :readonly="onlyread"
+                    dense
+                    standout
+                    outlined
+                  />
+                </div>
+              </div>
+            </q-card-section>
+          </q-card>
+        </div>
+      </q-card>
+    </q-dialog>
+    <q-dialog
+      v-model="elevator_dialog"
+      transition-show="jump-down"
+      transition-hide="jump-up"
+      @show="prepareDialog()"
+    >
+      <q-card style="min-width: 350px">
+        <q-bar
+          class="bg-light-blue-10 text-white rounded-borders"
+          style="height: 50px"
+        >
+          <div>
+            {{ $t("stock.elevator.elevator") }}
+          </div>
+          <q-space></q-space>
+          <q-btn dense flat icon="close" v-close-popup>
+            <q-tooltip
+              content-class="bg-amber text-black shadow-4"
+              :offset="[20, 20]"
+              content-style="font-size: 12px"
+            >
+              {{ $t("index.close") }}</q-tooltip
+            >
+          </q-btn>
+        </q-bar>
+        <q-card-section class="q-pt-md">
+          <q-input
+            dense
+            outlined
+            square
+            v-model="elevator_form.ip"
+            :label="$t('stock.elevator.ip')"
+            :readonly="onlyread"
+            :rules="[(val) => val?.length > 0 || error1]"
+          />
+          <q-input
+            dense
+            outlined
+            square
+            v-model="elevator_form.port"
+            :label="$t('stock.elevator.port')"
+            type="number"
+            :readonly="onlyread"
+            :rules="[
+              (val) => val !== null || error1,
+              (val) => val >= 0 || error1,
+            ]"
+          />
+          <q-input
+            dense
+            outlined
+            square
+            v-model="elevator_form.status"
+            :label="$t('stock.conveyor.status')"
+            :readonly="onlyread"
+            :rules="[(val) => val?.length > 0 || error1]"
+          />
+          <!-- <q-input dense outlined square v-model="elevator_form.password"
                         :label="$t('stock.elevator.password')" :readonly="onlyread"
                         :rules="[val => val?.length > 0 || error1]" /> -->
 
-                    <!-- <q-input dense outlined square v-model="elevator_form.username"
+          <!-- <q-input dense outlined square v-model="elevator_form.username"
                         :label="$t('stock.elevator.username')" :readonly="onlyread"
                         :rules="[val => val?.length > 0 || error1]" /> -->
-                </q-card-section>
-                <div style="float: right; padding: 15px 15px 15px 0">
-                    <q-btn color="white" text-color="black" style="margin-right: 25px"
-                        @click="shelfLocal = 'undefined'; handleclick()">
-                        {{ $t('stock.return') }}</q-btn>
-                    <q-btn color="primary" text-color="white" style="margin-right: 25px" @click=handleEdit()>
-                        {{ onlyread ? $t('stock.shelf.shelf_edit') : $t("stock.shelf.shelf_confirm") }}</q-btn>
-                </div>
-            </q-card>
-        </q-dialog>
-        <q-dialog v-model="conveyor_dialog" transition-show="jump-down" transition-hide="jump-up" @show=prepareDialog()>
-            <q-card style="min-width: 350px;">
-                <q-bar class="bg-light-blue-10 text-white rounded-borders" style="height: 50px">
-                    <div>
-                        {{ $t("stock.conveyor.conveyor") }}
-                    </div>
-                    <q-space></q-space>
-                    <q-btn dense flat icon="close" v-close-popup>
-                        <q-tooltip content-class="bg-amber text-black shadow-4" :offset="[20, 20]"
-                            content-style="font-size: 12px">
-                            {{ $t("index.close") }}</q-tooltip>
-                    </q-btn>
-                </q-bar>
-                <q-card-section class="q-pt-md">
-                    <q-input dense outlined square v-model="conveyor_form.ip" :label="$t('stock.conveyor.ip')"
-                        :readonly="onlyread" :rules="[val => val?.length > 0 || error1]" />
-                    <!-- <q-input dense outlined square v-model="conveyor_form.destination"
+        </q-card-section>
+        <div style="float: right; padding: 15px 15px 15px 0">
+          <q-btn
+            color="white"
+            text-color="black"
+            style="margin-right: 25px"
+            @click="
+              shelfLocal = 'undefined';
+              handleclick();
+            "
+          >
+            {{ $t("stock.return") }}</q-btn
+          >
+          <q-btn
+            color="primary"
+            text-color="white"
+            style="margin-right: 25px"
+            @click="handleEdit()"
+          >
+            {{
+              onlyread
+                ? $t("stock.shelf.shelf_edit")
+                : $t("stock.shelf.shelf_confirm")
+            }}</q-btn
+          >
+        </div>
+      </q-card>
+    </q-dialog>
+    <q-dialog
+      v-model="conveyor_dialog"
+      transition-show="jump-down"
+      transition-hide="jump-up"
+      @show="prepareDialog()"
+    >
+      <q-card style="min-width: 350px">
+        <q-bar
+          class="bg-light-blue-10 text-white rounded-borders"
+          style="height: 50px"
+        >
+          <div>
+            {{ $t("stock.conveyor.conveyor") }}
+          </div>
+          <q-space></q-space>
+          <q-btn dense flat icon="close" v-close-popup>
+            <q-tooltip
+              content-class="bg-amber text-black shadow-4"
+              :offset="[20, 20]"
+              content-style="font-size: 12px"
+            >
+              {{ $t("index.close") }}</q-tooltip
+            >
+          </q-btn>
+        </q-bar>
+        <q-card-section class="q-pt-md">
+          <q-input
+            dense
+            outlined
+            square
+            v-model="conveyor_form.ip"
+            :label="$t('stock.conveyor.ip')"
+            :readonly="onlyread"
+            :rules="[(val) => val?.length > 0 || error1]"
+          />
+          <!-- <q-input dense outlined square v-model="conveyor_form.destination"
                         :label="$t('stock.conveyor.destination')" :readonly="onlyread"
                         :rules="[val => val?.length > 0 || error1]" /> -->
-                    <q-input dense outlined square v-model="conveyor_form.port" :label="$t('stock.elevator.port')"
-                        type="number" :readonly="onlyread" :rules="[
-                            val => val !== null || error1,
-                            val => val >= 0 || error1,
-                        ]" />
-                    <q-input dense outlined square v-model="conveyor_form.status" :label="$t('stock.conveyor.status')"
-                        :readonly="onlyread" :rules="[val => val?.length > 0 || error1]" />
-                </q-card-section>
-                <div style="float: right; padding: 15px 15px 15px 0">
-                    <q-btn color="white" text-color="black" style="margin-right: 25px"
-                        @click="shelfLocal = 'undefined'; handleclick()">
-                        {{ $t('stock.return') }}</q-btn>
-
-                    <q-btn color="primary" text-color="white" style="margin-right: 25px" @click=handleEdit()>
-                        {{ onlyread ? $t('stock.shelf.shelf_edit') : $t("stock.shelf.shelf_confirm") }}</q-btn>
-
-                </div>
-            </q-card>
-        </q-dialog>
-
-    </div>
+          <q-input
+            dense
+            outlined
+            square
+            v-model="conveyor_form.port"
+            :label="$t('stock.elevator.port')"
+            type="number"
+            :readonly="onlyread"
+            :rules="[
+              (val) => val !== null || error1,
+              (val) => val >= 0 || error1,
+            ]"
+          />
+          <q-input
+            dense
+            outlined
+            square
+            v-model="conveyor_form.status"
+            :label="$t('stock.conveyor.status')"
+            :readonly="onlyread"
+            :rules="[(val) => val?.length > 0 || error1]"
+          />
+        </q-card-section>
+        <div style="float: right; padding: 15px 15px 15px 0">
+          <q-btn
+            color="white"
+            text-color="black"
+            style="margin-right: 25px"
+            @click="
+              shelfLocal = 'undefined';
+              handleclick();
+            "
+          >
+            {{ $t("stock.return") }}</q-btn
+          >
+
+          <q-btn
+            color="primary"
+            text-color="white"
+            style="margin-right: 25px"
+            @click="handleEdit()"
+          >
+            {{
+              onlyread
+                ? $t("stock.shelf.shelf_edit")
+                : $t("stock.shelf.shelf_confirm")
+            }}</q-btn
+          >
+        </div>
+      </q-card>
+    </q-dialog>
+  </div>
 </template>
 
 <script>
-
-
 import { getauth } from 'boot/axios_request'
 
 export default {
   props: {
-
     rowIndex: Number,
     colIndex: Number,
     layerIndex: Number,
     selectedShelfType: String,
     goodsData: Object
-
   },
   data () {
     return {
@@ -276,22 +498,18 @@ export default {
           batch: '',
           quantity: 0,
           location: ''
-
         },
         {
           id: 2,
           batch: '',
           quantity: 0,
           location: ''
-
         }
-
       ],
       inventoryColumns: [
         { name: 'batch', label: '批次', field: 'batch', align: 'left' },
         { name: 'quantity', label: '数量', field: 'quantity', align: 'right' },
         { name: 'location', label: '位置', field: 'location', align: 'left' }
-
       ],
       user_id: '',
       auth_id: '',
@@ -304,7 +522,20 @@ export default {
 
       shelf_type: { shelf_type: 'undefined' },
       ip_change: { ip_address: '192.168.1.100', port: 8080, status: 'offline' },
-      goods_change: { shelf_status: '未满', goods_batch: '20230701-001', goods_code: 'A010203', goods_name: '存货货物', goods_std: '规格型号', goods_desc: '存货描述', goods_qty: 123456, goods_unit: 'kg', goods_price: 123456, goods_notes: '备注', goods_in: 123456, goods_out: 123456 },
+      goods_change: {
+        shelf_status: '未满',
+        goods_batch: '20230701-001',
+        goods_code: 'A010203',
+        goods_name: '存货货物',
+        goods_std: '规格型号',
+        goods_desc: '存货描述',
+        goods_qty: 123456,
+        goods_unit: 'kg',
+        goods_price: 123456,
+        goods_notes: '备注',
+        goods_in: 123456,
+        goods_out: 123456
+      },
 
       error1: this.$t('stock.shelf.error1'),
       shelfLocal: '',
@@ -317,7 +548,6 @@ export default {
   },
 
   methods: {
-
     prepareDialog () {
       this.onlyread = true
     },
@@ -325,10 +555,33 @@ export default {
     handleclick () {
       this.shelfLocal = this.selectedShelfType
 
-      if (this.shelfLocal === 'undefined') { this.clickedinput = true, this.storage_dialog = false, this.elevator_dialog = false, this.conveyor_dialog = false }
-      if (this.shelfLocal === 'storage') { this.getList(), this.clickedinput = false, this.storage_dialog = true, this.elevator_dialog = false, this.conveyor_dialog = false }
-      if (this.shelfLocal === 'elevator') { this.getList(), this.clickedinput = false, this.storage_dialog = false, this.elevator_dialog = true, this.conveyor_dialog = false }
-      if (this.shelfLocal === 'conveyor') { this.getList(), this.clickedinput = false, this.storage_dialog = false, this.elevator_dialog = false, this.conveyor_dialog = true }
+      if (this.shelfLocal === 'undefined') {
+        (this.clickedinput = true),
+        (this.storage_dialog = false),
+        (this.elevator_dialog = false),
+        (this.conveyor_dialog = false)
+      }
+      if (this.shelfLocal === 'storage') {
+        this.getList(),
+        (this.clickedinput = false),
+        (this.storage_dialog = true),
+        (this.elevator_dialog = false),
+        (this.conveyor_dialog = false)
+      }
+      if (this.shelfLocal === 'elevator') {
+        this.getList(),
+        (this.clickedinput = false),
+        (this.storage_dialog = false),
+        (this.elevator_dialog = true),
+        (this.conveyor_dialog = false)
+      }
+      if (this.shelfLocal === 'conveyor') {
+        this.getList(),
+        (this.clickedinput = false),
+        (this.storage_dialog = false),
+        (this.elevator_dialog = false),
+        (this.conveyor_dialog = true)
+      }
     },
 
     getList () {
@@ -356,7 +609,6 @@ export default {
           batch: '',
           quantity: 0,
           location: ''
-
         },
         {
           id: 2,
@@ -364,13 +616,12 @@ export default {
           quantity: 0,
           location: ''
         }
-
       ]
       getauth(_this.pathname + _this.goodsData.id + '/')
-        .then(res1 => {
+        .then((res1) => {
           console.log(res1)
           console.log(res1.current_containers)
-          if (res1.current_containers.length == 0) {
+          if (res1.current_containers.length === 0) {
             console.log('当前托盘ID为空')
             _this.$q.notify({
               message: '当前库位为空',
@@ -383,28 +634,28 @@ export default {
           console.log('当前托盘ID', _this.container_id)
           console.log('当前托盘ID长度', res1.current_containers.length)
 
-          getauth(_this.pathnamecontainer + '?container=' + _this.container_id)
-            .then(res => {
-              var results = res.results[0]
-              this.storage_form.goods_batch = results.batch.bound_number
-              this.storage_form.goods_code = results.batch.goods_code
-              this.storage_form.goods_name = results.batch.goods_desc
-              this.storage_form.goods_std = results.batch.goods_std
-              this.storage_form.goods_desc = results.batch.goods_desc
-              this.storage_form.goods_qty = results.batch.goods_qty
-              this.storage_form.goods_unit = results.batch.goods_unit
-              this.storage_form.goods_price = results.batch.goods_price
-              this.storage_form.goods_notes = results.goods_qty
-              this.storage_form.goods_in = results.batch.goods_in
-              this.storage_form.goods_out = results.batch.goods_out
-              this.storage_form.shelf_name = results.shelf_name
-              this.storage_form.shelf_department = results.shelf_department
-              this.storage_form.shelf_warehouse = results.warehouse_name
-              this.storage_form.shelf_status = results.status
-            }
-
-            )
-        }).catch(err => {
+          getauth(
+            _this.pathnamecontainer + '?container=' + _this.container_id
+          ).then((res) => {
+            var results = res.results[0]
+            this.storage_form.goods_batch = results.batch.bound_number
+            this.storage_form.goods_code = results.batch.goods_code
+            this.storage_form.goods_name = results.batch.goods_desc
+            this.storage_form.goods_std = results.batch.goods_std
+            this.storage_form.goods_desc = results.batch.goods_desc
+            this.storage_form.goods_qty = results.batch.goods_qty
+            this.storage_form.goods_unit = results.batch.goods_unit
+            this.storage_form.goods_price = results.batch.goods_price
+            this.storage_form.goods_notes = results.goods_qty
+            this.storage_form.goods_in = results.batch.goods_in
+            this.storage_form.goods_out = results.batch.goods_out
+            this.storage_form.shelf_name = results.shelf_name
+            this.storage_form.shelf_department = results.shelf_department
+            this.storage_form.shelf_warehouse = results.warehouse_name
+            this.storage_form.shelf_status = results.status
+          })
+        })
+        .catch((err) => {
           _this.$q.notify({
             message: err.detail,
             icon: 'close',
@@ -414,22 +665,16 @@ export default {
     }
   }
 }
-
 </script>
 
 <style scoped>
-
 :deep(.q-field__label) {
-
-    margin-top: 8px;
-    align-self: center;
-
+  margin-top: 8px;
+  align-self: center;
 }
 
 :deep(.q-field__control-container) {
-
-    padding-left: 50px;
-    margin-top: -5px;
-
+  padding-left: 50px;
+  margin-top: -5px;
 }
 </style>

+ 29 - 3
templates/src/pages/inbound/asn.vue

@@ -774,7 +774,10 @@
                   flat
                   bordered
                   hide-pagination
-                  class="my-sticky-table"
+                  class="my-sticky-table scrollable-table"
+                  :style="{ 'max-height': '400px' }"
+                  :container-style="{ height: 'auto' }"
+                   :pagination="{ rowsPerPage: 0 }"
                 >
                   <template v-slot:body-cell-actions="props">
                     <q-td :props="props">
@@ -1470,7 +1473,7 @@ export default {
         })
       console.log('detail查询的结果是:', _this.table_detail)
 
-      getauth('bound/detail/?bound_list=' + _this.detailid)
+      getauth('bound/detail/?max_page=1000&bound_list=' + _this.detailid)
         .then((res) => {
           _this.batch_detail = res.results
         })
@@ -1794,9 +1797,32 @@ export default {
 }
 
 /* 隐藏Chrome/Safari的数字箭头 */
-.centered-input ::v-deep input::-webkit-outer-spin-button,
+
 .centered-input ::v-deep input::-webkit-inner-spin-button {
   -webkit-appearance: none;
   margin: 0;
 }
+
+/* 修改滚动样式 */
+.scrollable-table {
+  flex: 1; /* 允许表格填充剩余空间 */
+  display: flex;
+  flex-direction: column;
+}
+
+.scrollable-table .q-table__container {
+  flex: 1;
+  overflow: auto;
+}
+
+.scrollable-table .q-table__top {
+  position: sticky;
+  top: 0;
+  background: white;
+  z-index: 1;
+}
+
+.my-sticky-table .q-table__middle {
+  overflow-y: auto !important;
+}
 </style>

+ 5 - 6
templates/src/pages/stock/management.vue

@@ -234,7 +234,7 @@ export default {
             this.select_Inventory.rowIndex = row
             this.select_Inventory.colIndex = col
             this.select_Inventory.layerIndex = layer
-            console.log(this.goodsMap[`${row}-${col}-${layer}`])
+            console.log('goodsMap',this.goodsMap[`${row}-${col}-${layer}`])
             if (['T1', 'T2', 'T4', 'T5', 'S4'].includes(this.goodsMap[`${row}-${col}-${layer}`]?.location_type))
                 {
                     this.select_Inventory.shelf_type = "storage"
@@ -249,7 +249,7 @@ export default {
                 }
             this.select_Inventory.goods_data = this.goodsMap[`${row}-${col}-${layer}`]
             this.showInventoryDetails = true
-            console.log(this.select_Inventory)
+            console.log('this.select_Inventory',this.select_Inventory)
             this.$nextTick(() => {
                 this.$refs.goodscard.handleclick();
             });
@@ -262,8 +262,7 @@ export default {
             // 获取组件容器的实际尺寸
             const dwidth = document.documentElement.clientWidth
             const dheight = document.documentElement.clientHeight
-            console.log(dwidth, dheight)
-  
+
             // 
             const width = dwidth * 0.6
             const height = dheight * 0.6
@@ -273,7 +272,7 @@ export default {
             var cell_x = cell_d *  1/ 5 //网格占比
             var cellSize = cell_x / 2
             var cellGap = height / this.shelf.rows - cell_d
-            //console.log(cellSize, cellGap)
+
             if (cellGap < 2) {
                 cellGap = 2
                 cell_d = (height - cellGap * this.shelf.rows) / this.shelf.rows;
@@ -282,7 +281,7 @@ export default {
             }
             var cellSize_2 = cellGap / 2
             var axis_x = cell_x * this.shelf.cols + cell_d * this.shelf.cols
-            //console.log(axis_x)
+
             root.style.setProperty('--cell-d', `${cell_d}px`)
             root.style.setProperty('--cell-d-x', `${cell_d + cell_x}px`)