ソースを参照

修改pda组盘

flower_mr 4 週間 前
コミット
31a9cb068c

BIN
container/__pycache__/views.cpython-38.pyc


+ 114 - 112
container/views.py

@@ -818,120 +818,122 @@ class ContainerDetailViewSet(viewsets.ModelViewSet):
         for batch in batches:
             bound_number = batch.get('goods_code')
             goods_qty = batch.get('goods_qty')
+            goods_group_number = batch.get('goods_group')
+            for i in range(goods_group_number):
             
-            # 查询商品对象
-            bound_obj = BoundBatchModel.objects.filter(bound_number=bound_number).first()
-
-            if not bound_obj:
-                # 如果商品不存在,返回错误,这里暂时在程序中进行提醒,后续需要改为前端弹窗提醒
-                logger.error(f"批次 {bound_number} 不存在")
-                # 跳出此次循环
-                continue
-                # return Response({"error": f"商品编码 {bound_number} 不存在"}, status=400)
-            # 3. 更新批次数据(根据业务规则)
-            try:
-                last_qty = bound_obj.goods_in_qty
-                bound_obj.goods_in_qty += batch.get("goods_qty", 0)
-                if bound_obj.goods_in_qty >= bound_obj.goods_qty:
-                    bound_obj.goods_in_qty = bound_obj.goods_qty
-                    bound_obj.status = 1 # 批次状态为组盘完成
-                    print('批次id',bound_obj.id) 
-                    bound_detail_obj = BoundDetailModel.objects.filter(bound_batch=bound_obj.id).first()
-                    if bound_detail_obj:
-                        bound_detail_obj.status = 1
-                        bound_detail_obj.save()
-                        print('入库申请id',bound_detail_obj.bound_list_id)
-                        # 入库申请全部批次入库完成
-                        bound_batch_all = BoundDetailModel.objects.filter(bound_list=bound_detail_obj.bound_list_id).all()
-                        if bound_batch_all.count() == bound_batch_all.filter(status=1).count():
-                            bound_list_obj = BoundListModel.objects.filter(id=bound_detail_obj.bound_list_id).first()
-                            print('当前状态',bound_list_obj.bound_status)
-                            bound_list_obj.bound_status = 102
-                            print('更新状态',bound_list_obj.bound_status)
-                            bound_list_obj.save()
-                            print('入库申请全部批次组盘完成')
-                        else:
-                            print('入库申请部分批次组盘完成')
-                else:
-                    bound_obj.status = 0
-                
-                bound_obj.save()  # 保存到数据库
-                # 创建托盘详情记录(每个批次独立)
-                print('新增个数',bound_obj.goods_in_qty-last_qty)
-                if bound_obj.goods_in_qty-last_qty == goods_qty:
-                    detail_data = {
-                        "container": data['container'],  # 托盘ID
-                        "batch": bound_obj.id,  # 外键关联批次
-                        "goods_code": bound_obj.goods_code,
-                        "goods_desc": bound_obj.goods_desc,
-                        "goods_qty": goods_qty,
-                        "goods_weight": bound_obj.goods_weight,
-                        "status": 1,
-                        "month": data['month'],
-                        "creater": data.get('creater', 'zl')  # 默认值兜底
-                    }
-                    serializer = self.get_serializer(data=detail_data)
-                    serializer.is_valid(raise_exception=True)
-                    serializer.save()  # 必须保存到数据库
-                    operate_data = {
-                        "month" : data['month'],
-                        "container": data['container'],  # 托盘ID
-                        "operation_type" : 'container',
-                        "batch" : bound_obj.id,  # 外键关联批次
-                        "goods_code": bound_obj.goods_code,
-                        "goods_desc": bound_obj.goods_desc,
-                        "goods_qty": goods_qty,
-                        "goods_weight": bound_obj.goods_weight,
-                        "operator": data.get('creater', 'zl'),  # 默认值兜底
-                        "timestamp": timezone.now(),
-                        "from_location": "container",
-                        "to_location": "container",
-                        "memo": "入库PDA组盘,pda入库"+str(bound_obj.goods_code)+"数量"+str(goods_qty)
-                    }
-                    serializer_operate = ContainerOperationPostSerializer(data=operate_data)
-                    serializer_operate.is_valid(raise_exception=True)
-                    serializer_operate.save()  # 必须保存到数据库
-
-                elif bound_obj.goods_in_qty-last_qty > 0:
-                    print('批次数量不一致')
-                    detail_data = {
-                        "container": data['container'],  # 托盘ID
-                        "batch": bound_obj.id,  # 外键关联批次
-                        "goods_code": bound_obj.goods_code,
-                        "goods_desc": bound_obj.goods_desc,
-                        "goods_qty": bound_obj.goods_in_qty-last_qty,
-                        "goods_weight": bound_obj.goods_weight,
-                        "status": 1,
-                        "month": data['month'],
-                        "creater": data.get('creater', 'zl')  # 默认值兜底
-                    }
-                    serializer = self.get_serializer(data=detail_data)
-                    serializer.is_valid(raise_exception=True)
-                    serializer.save()  # 必须保存到数据库
-                    operate_data = {
-                        "month" : data['month'],
-                        "container": data['container'],  # 托盘ID
-                        "operation_type" : 'container',
-                        "batch" : bound_obj.id,  # 外键关联批次
-                        "goods_code": bound_obj.goods_code,
-                        "goods_desc": bound_obj.goods_desc,
-                        "goods_qty": bound_obj.goods_in_qty-last_qty,
-                        "goods_weight": bound_obj.goods_weight,
-                        "operator": data.get('creater', 'zl'),  # 默认值兜底
-                        "timestamp": timezone.now(),
-                        "from_location": "container",
-                        "to_location": "container",
-                        "memo": "入库PDA组盘,(数量不一致)pda入库"+str(bound_obj.goods_code)+"数量"+str(goods_qty)
-                    }
-                    serializer_operate = ContainerOperationPostSerializer(data=operate_data)
-                    serializer_operate.is_valid(raise_exception=True)
-                    serializer_operate.save()  # 必须保存到数据库
-                else :
-                    print('重复组盘')
+                # 查询商品对象
+                bound_obj = BoundBatchModel.objects.filter(bound_number=bound_number).first()
+
+                if not bound_obj:
+                    # 如果商品不存在,返回错误,这里暂时在程序中进行提醒,后续需要改为前端弹窗提醒
+                    logger.error(f"批次 {bound_number} 不存在")
+                    # 跳出此次循环
+                    continue
+                    # return Response({"error": f"商品编码 {bound_number} 不存在"}, status=400)
+                # 3. 更新批次数据(根据业务规则)
+                try:
+                    last_qty = bound_obj.goods_in_qty
+                    bound_obj.goods_in_qty += batch.get("goods_qty", 0)
+                    if bound_obj.goods_in_qty >= bound_obj.goods_qty:
+                        bound_obj.goods_in_qty = bound_obj.goods_qty
+                        bound_obj.status = 1 # 批次状态为组盘完成
+                        print('批次id',bound_obj.id) 
+                        bound_detail_obj = BoundDetailModel.objects.filter(bound_batch=bound_obj.id).first()
+                        if bound_detail_obj:
+                            bound_detail_obj.status = 1
+                            bound_detail_obj.save()
+                            print('入库申请id',bound_detail_obj.bound_list_id)
+                            # 入库申请全部批次入库完成
+                            bound_batch_all = BoundDetailModel.objects.filter(bound_list=bound_detail_obj.bound_list_id).all()
+                            if bound_batch_all.count() == bound_batch_all.filter(status=1).count():
+                                bound_list_obj = BoundListModel.objects.filter(id=bound_detail_obj.bound_list_id).first()
+                                print('当前状态',bound_list_obj.bound_status)
+                                bound_list_obj.bound_status = 102
+                                print('更新状态',bound_list_obj.bound_status)
+                                bound_list_obj.save()
+                                print('入库申请全部批次组盘完成')
+                            else:
+                                print('入库申请部分批次组盘完成')
+                    else:
+                        bound_obj.status = 0
                     
-            except Exception as e:
-                print(f"更新批次 {bound_number} 失败: {str(e)}")
-                continue
+                    bound_obj.save()  # 保存到数据库
+                    # 创建托盘详情记录(每个批次独立)
+                    print('新增个数',bound_obj.goods_in_qty-last_qty)
+                    if bound_obj.goods_in_qty-last_qty == goods_qty:
+                        detail_data = {
+                            "container": data['container'],  # 托盘ID
+                            "batch": bound_obj.id,  # 外键关联批次
+                            "goods_code": bound_obj.goods_code,
+                            "goods_desc": bound_obj.goods_desc,
+                            "goods_qty": goods_qty,
+                            "goods_weight": bound_obj.goods_weight,
+                            "status": 1,
+                            "month": data['month'],
+                            "creater": data.get('creater', 'zl')  # 默认值兜底
+                        }
+                        serializer = self.get_serializer(data=detail_data)
+                        serializer.is_valid(raise_exception=True)
+                        serializer.save()  # 必须保存到数据库
+                        operate_data = {
+                            "month" : data['month'],
+                            "container": data['container'],  # 托盘ID
+                            "operation_type" : 'container',
+                            "batch" : bound_obj.id,  # 外键关联批次
+                            "goods_code": bound_obj.goods_code,
+                            "goods_desc": bound_obj.goods_desc,
+                            "goods_qty": goods_qty,
+                            "goods_weight": bound_obj.goods_weight,
+                            "operator": data.get('creater', 'zl'),  # 默认值兜底
+                            "timestamp": timezone.now(),
+                            "from_location": "container",
+                            "to_location": "container",
+                            "memo": "入库PDA组盘,pda入库"+str(bound_obj.goods_code)+"数量"+str(goods_qty)
+                        }
+                        serializer_operate = ContainerOperationPostSerializer(data=operate_data)
+                        serializer_operate.is_valid(raise_exception=True)
+                        serializer_operate.save()  # 必须保存到数据库
+
+                    elif bound_obj.goods_in_qty-last_qty > 0:
+                        print('批次数量不一致')
+                        detail_data = {
+                            "container": data['container'],  # 托盘ID
+                            "batch": bound_obj.id,  # 外键关联批次
+                            "goods_code": bound_obj.goods_code,
+                            "goods_desc": bound_obj.goods_desc,
+                            "goods_qty": bound_obj.goods_in_qty-last_qty,
+                            "goods_weight": bound_obj.goods_weight,
+                            "status": 1,
+                            "month": data['month'],
+                            "creater": data.get('creater', 'zl')  # 默认值兜底
+                        }
+                        serializer = self.get_serializer(data=detail_data)
+                        serializer.is_valid(raise_exception=True)
+                        serializer.save()  # 必须保存到数据库
+                        operate_data = {
+                            "month" : data['month'],
+                            "container": data['container'],  # 托盘ID
+                            "operation_type" : 'container',
+                            "batch" : bound_obj.id,  # 外键关联批次
+                            "goods_code": bound_obj.goods_code,
+                            "goods_desc": bound_obj.goods_desc,
+                            "goods_qty": bound_obj.goods_in_qty-last_qty,
+                            "goods_weight": bound_obj.goods_weight,
+                            "operator": data.get('creater', 'zl'),  # 默认值兜底
+                            "timestamp": timezone.now(),
+                            "from_location": "container",
+                            "to_location": "container",
+                            "memo": "入库PDA组盘,(数量不一致)pda入库"+str(bound_obj.goods_code)+"数量"+str(goods_qty)
+                        }
+                        serializer_operate = ContainerOperationPostSerializer(data=operate_data)
+                        serializer_operate.is_valid(raise_exception=True)
+                        serializer_operate.save()  # 必须保存到数据库
+                    else :
+                        print('重复组盘')
+                        
+                except Exception as e:
+                    print(f"更新批次 {bound_number} 失败: {str(e)}")
+                    continue
 
         # 将处理后的数据返回(或根据业务需求保存到数据库)
         res_data={

+ 192 - 192
data_base/product.csv

@@ -1,192 +1,192 @@
-id,product_code,product_name,product_std,creater,is_delete
-1,D/DA06,地奥司明,STP,first,0
-2,DAP01,地奥司明,STP,first,0
-3,DAP02,地奥司明,STP,first,0
-4,DAP04,地奥司明,STP,first,0
-5,DAP05,地奥司明,STP,first,0
-6,DAP06,地奥司明,STP,first,0
-7,DAP08,柑橘黄酮,STP,first,0
-8,DAP09,地奥司明,STP,first,0
-9,DAP10,地奥司明,STP,first,0
-10,DAP11,地奥司明,STP,first,0
-11,DAP08,柑橘黄酮,STP,first,0
-12,DBP08,柑橘黄酮,STP,first,0
-13,DBP01,地奥司明微粉,STP,first,0
-14,DBP04,地奥司明微粉,STP,first,0
-15,DBP05,地奥司明微粉,STP,first,0
-16,DBP06,地奥司明微粉,STP,first,0
-17,DBP09,地奥司明微粉,STP,first,0
-18,DBP10,地奥司明微粉,STP,first,0
-19,DBP11,地奥司明微粉,STP,first,0
-20,DBP12,地奥司明微粉,STP,first,0
-21,DFF03,地奥司明A/SG,STP,first,0
-22,DBP07,MPFF,STP,first,0
-23,DAF01,地奥司明,STP,first,0
-24,DAF02,地奥司明,STP,first,0
-25,DAF03,地奥司明,STP,first,0
-26,DAF04,地奥司明,STP,first,0
-27,DAF05,地奥司明,STP,first,0
-28,DBF01,地奥司明微粉,STP,first,0
-29,DBF02,地奥司明微粉,STP,first,0
-30,DBF03,地奥司明微粉,STP,first,0
-31,DBF04,地奥司明微粉,STP,first,0
-32,DBF05,地奥司明微粉,STP,first,0
-33,D/RAF01,芦丁,STP,first,0
-34,D/RCF01,芦丁,STP,first,0
-35,D/RDF01,芦丁,STP,first,0
-36,D/RDF02,芦丁,STP,first,0
-37,D/RF02,芦丁,STP,first,0
-38,D/RDP01,芦丁,STP,first,0
-39,D/RI01,芦丁(S),STP,first,0
-40,RDP01,芦丁(S),STP,first,0
-41,RDP02,芦丁(S),STP,first,0
-42,RF02,芦丁A,STP,first,0
-43,RF04,芦丁E,STP,first,0
-44,D/TAF01,曲克芦丁,STP,first,0
-45,D/UAF01,L-鼠李糖,STP,first,0
-46,DHF02,香叶木素,STP,first,0
-47,DHF02,香叶木素,STP,first,0
-48,D/NAF01,新橙皮苷,STP,first,0
-49,D/NCF01,柚苷,STP,first,0
-50,D/NDF01,柚皮苷二氢查耳酮,STP,first,0
-51,CCF01,鹰嘴豆蛋白,STP,first,0
-52,PBF01,根皮素,STP,first,0
-53,PAF01,普鲁宁,STP,first,0
-54,EG01,蛋黄粉(脱脂),STP,first,0
-55,GAF01,染料木素,STP,first,0
-56,HDF01,橙皮素,STP,first,0
-57,GBF01,葡糖基芦丁(AGR),STP,first,0
-58,D/EG02,(鸡)蛋黄粉,STP,first,0
-59,EG02,(鸡)蛋黄粉,STP,first,0
-60,RHF01,白藜芦醇,STP,first,0
-61,LBF01,左旋多巴,STP,first,0
-62,BDF01,苦荞黄酮,STP,first,0
-63,SBF01,甜橙皮提取物,STP,first,0
-64,D/SBF01,甜橙皮提取物,STP,first,0
-65,LCF01,圣草次苷,STP,first,0
-66,AAP01,青蒿素,STP,first,0
-67,ABP01,双氢青蒿素,STP,first,0
-68,ADP01,蒿甲醚,STP,first,0
-69,ACP01,青蒿琥酯,STP,first,0
-70,DAF04,地奥司明,F-STP,first,0
-71,DCF02,地奥司明:橙皮苷(90:10),F-STP,first,0
-72,DCF03,地奥司明:橙皮苷(90:10),F-STP,first,0
-73,DCF04,地奥司明:橙皮苷(90:10),F-STP,first,0
-74,DCF06,地奥司明:橙皮苷(90:10),F-STP,first,0
-75,DDF02,地奥司明:橙皮苷(90:10)微粉,F-STP,first,0
-76,DDF03,地奥司明:橙皮苷(90:10)微粉,F-STP,first,0
-77,DGF01,地奥司明:橙皮苷(90:10)颗粒,F-STP,first,0
-78,LDF01,柠檬黄酮,F-STP,first,0
-79,QHF01,二氢槲皮素,F-STP,first,0
-80,QM02,芦丁水解中和浓缩液,F-STP,first,0
-81,GBF01,葡萄柚黄酮,F-STP,first,0
-82,GBF02,葡萄柚黄酮,F-STP,first,0
-83,GBF03,葡萄柚黄酮,F-STP,first,0
-84,BAF01,盐酸小檗碱,F-STP,first,0
-85,BAF02,盐酸小檗碱,F-STP,first,0
-86,BAF03,盐酸小檗碱,F-STP,first,0
-87,BBF04,盐酸小檗碱颗粒,F-STP,first,0
-88,BBF05,盐酸小檗碱颗粒,F-STP,first,0
-89,BCF03,高密度盐酸小檗碱,F-STP,first,0
-90,D/NBF05,新甲基橙皮苷二氢查耳酮,F-STP,first,0
-91,NBF01,新甲基橙皮苷二氢查耳酮,F-STP,first,0
-92,NBF05,新甲基橙皮苷二氢查耳酮,F-STP,first,0
-93,D/QAF01,二水槲皮素,F-STP,first,0
-94,D/QAF03,二水槲皮素,F-STP,first,0
-95,D/QAF08,二水槲皮素,F-STP,first,0
-96,D/QBF03,二水槲皮素颗粒,F-STP,first,0
-97,D/QDF02,无水槲皮素,F-STP,first,0
-98,D/QDF02,无水槲皮素(HM-02),F-STP,first,0
-99,D/QDF03,无水槲皮素,F-STP,first,0
-100,D/QDF04,无水槲皮素,F-STP,first,0
-101,D/QEF01,无水槲皮素颗粒,F-STP,first,0
-102,QAF01,二水槲皮素,F-STP,first,0
-103,QAF03,二水槲皮素,F-STP,first,0
-104,QAF05,二水槲皮素,F-STP,first,0
-105,QAF08,二水槲皮素,F-STP,first,0
-106,QBF03,二水槲皮素颗粒,F-STP,first,0
-107,QCF02,二水高密度槲皮素,F-STP,first,0
-108,QCF03,二水高密度槲皮素,F-STP,first,0
-109,QCF05,二水高密度槲皮素,F-STP,first,0
-110,QCF06,二水高密度槲皮素,F-STP,first,0
-111,QDF02,无水槲皮素(HM-02),F-STP,first,0
-112,QDF02,无水槲皮素,F-STP,first,0
-113,QDF03,无水槲皮素,F-STP,first,0
-114,QDF04,无水槲皮素,F-STP,first,0
-115,QDF05,无水槲皮素,F-STP,first,0
-116,QEF01,无水槲皮素颗粒,F-STP,first,0
-117,QEF02,无水槲皮素颗粒,F-STP,first,0
-118,QEF03,无水槲皮素颗粒,F-STP,first,0
-119,QEF04,无水槲皮素颗粒,F-STP,first,0
-120,QFF02,无水高密度槲皮素,F-STP,first,0
-121,QFF04,无水高密度槲皮素,F-STP,first,0
-122,QGF01,槐树花浸膏,F-STP,first,0
-123,RGF01,白藜芦醇颗粒,F-STP,first,0
-124,D/IAF01,异槲皮苷,F-STP,first,0
-125,D/IAF02,异槲皮苷,F-STP,first,0
-126,QHF01,二氢槲皮素,F-STP,first,0
-127,IAF01,异槲皮苷,F-STP,first,0
-128,IAF02,异槲皮苷,F-STP,first,0
-129,HAF01,橙皮苷,F-STP,first,0
-130,HAF02,橙皮苷,F-STP,first,0
-131,HAF03,橙皮苷,F-STP,first,0
-132,HAF04,橙皮苷,F-STP,first,0
-133,HBF01,橙皮苷微粉,F-STP,first,0
-134,HBF02,橙皮苷微粉,F-STP,first,0
-135,HBF03,橙皮苷微粉,F-STP,first,0
-136,HBP01,橙皮苷微粉,F-STP,first,0
-137,HCF01,橙皮苷颗粒,F-STP,first,0
-138,HCF02,橙皮苷颗粒,F-STP,first,0
-139,HCF03,橙皮苷颗粒,F-STP,first,0
-140,HAF01,橙皮苷,F-STP,first,0
-141,CAF01,枳实黄酮,F-STP,first,0
-142,CAF02,枳实黄酮,F-STP,first,0
-143,CAF03,枳实黄酮,F-STP,first,0
-144,CAF04,枳实黄酮,F-STP,first,0
-145,CAF05,枳实黄酮,F-STP,first,0
-146,CAF06,枳实黄酮,F-STP,first,0
-147,CAF07,枳实黄酮,F-STP,first,0
-148,CAF08,枳实黄酮,F-STP,first,0
-149,CBF01,枳实黄酮颗粒,F-STP,first,0
-150,CBF02,枳实黄酮颗粒,F-STP,first,0
-151,CBF03,枳实黄酮颗粒,F-STP,first,0
-152,RI01,芦丁(S),F-STP,first,0
-153,RI02,芦丁(S),F-STP,first,0
-154,TAF01,曲克芦丁,F-STP,first,0
-155,TAF03,曲克芦丁,F-STP,first,0
-156,TAF04,曲克芦丁,F-STP,first,0
-157,TBF01,曲克芦丁,F-STP,first,0
-158,RFF01,水溶性芦丁,F-STP,first,0
-159,RAF01,芦丁,F-STP,first,0
-160,RCF01,芦丁,F-STP,first,0
-161,RDF01,芦丁,F-STP,first,0
-162,RDF02,芦丁,F-STP,first,0
-163,RDF03,芦丁,F-STP,first,0
-164,RDF04,芦丁,F-STP,first,0
-165,RDF05,芦丁,F-STP,first,0
-166,REF01,芦丁颗粒,F-STP,first,0
-167,NCF01,柚苷,F-STP,first,0
-168,MBF01,橙皮苷甲基查耳酮,F-STP,first,0
-169,HDF01,橙皮素,F-STP,first,0
-170,NDF01,柚皮苷二氢查耳酮,F-STP,first,0
-171,NGF01,柚皮素,F-STP,first,0
-172,NAF01,新橙皮苷,F-STP,first,0
-173,NAF02,新橙皮苷,F-STP,first,0
-174,DHF01,香叶木素,F-STP,first,0
-175,DHF02,香叶木素,F-STP,first,0
-176,DFF01,地奥司明香叶木素颗粒,F-STP,first,0
-177,DFF02,地奥司明香叶木素颗粒,F-STP,first,0
-178,DEF01,地奥司明颗粒,F-STP,first,0
-179,DEF02,地奥司明颗粒,F-STP,first,0
-180,DEF03,地奥司明颗粒,F-STP,first,0
-181,DEF04,地奥司明颗粒,F-STP,first,0
-182,DFF03,地奥司明A/SG,F-STP,first,0
-183,HFF01,柑橘提取物,F-STP,first,0
-184,D/UAF01,L-鼠李糖,F-STP,first,0
-185,UAF01,L-鼠李糖,F-STP,first,0
-186,NFF01,柚苷颗粒,F-STP,first,0
-187,LUF01,木犀草素,F-STP,first,0
-188,GAF01,染料木素,F-STP,first,0
-189,NGF01,柚皮苷,F-STP,first,0
-190,LCF01,圣草次苷,F-STP,first,0
-191,FAF01,漆黄素,F-STP,first,0
+id,product_code,product_name,product_std,product_unit,creater,is_delete
+1,D/DA06,地奥司明,STP,kg,first,0
+2,DAP01,地奥司明,STP,kg,first,0
+3,DAP02,地奥司明,STP,kg,first,0
+4,DAP04,地奥司明,STP,kg,first,0
+5,DAP05,地奥司明,STP,kg,first,0
+6,DAP06,地奥司明,STP,kg,first,0
+7,DAP08,柑橘黄酮,STP,kg,first,0
+8,DAP09,地奥司明,STP,kg,first,0
+9,DAP10,地奥司明,STP,kg,first,0
+10,DAP11,地奥司明,STP,kg,first,0
+11,DAP08,柑橘黄酮,STP,kg,first,0
+12,DBP08,柑橘黄酮,STP,kg,first,0
+13,DBP01,地奥司明微粉,STP,kg,first,0
+14,DBP04,地奥司明微粉,STP,kg,first,0
+15,DBP05,地奥司明微粉,STP,kg,first,0
+16,DBP06,地奥司明微粉,STP,kg,first,0
+17,DBP09,地奥司明微粉,STP,kg,first,0
+18,DBP10,地奥司明微粉,STP,kg,first,0
+19,DBP11,地奥司明微粉,STP,kg,first,0
+20,DBP12,地奥司明微粉,STP,kg,first,0
+21,DFF03,地奥司明A/SG,STP,kg,first,0
+22,DBP07,MPFF,STP,kg,first,0
+23,DAF01,地奥司明,STP,kg,first,0
+24,DAF02,地奥司明,STP,kg,first,0
+25,DAF03,地奥司明,STP,kg,first,0
+26,DAF04,地奥司明,STP,kg,first,0
+27,DAF05,地奥司明,STP,kg,first,0
+28,DBF01,地奥司明微粉,STP,kg,first,0
+29,DBF02,地奥司明微粉,STP,kg,first,0
+30,DBF03,地奥司明微粉,STP,kg,first,0
+31,DBF04,地奥司明微粉,STP,kg,first,0
+32,DBF05,地奥司明微粉,STP,kg,first,0
+33,D/RAF01,芦丁,STP,kg,first,0
+34,D/RCF01,芦丁,STP,kg,first,0
+35,D/RDF01,芦丁,STP,kg,first,0
+36,D/RDF02,芦丁,STP,kg,first,0
+37,D/RF02,芦丁,STP,kg,first,0
+38,D/RDP01,芦丁,STP,kg,first,0
+39,D/RI01,芦丁(S),STP,kg,first,0
+40,RDP01,芦丁(S),STP,kg,first,0
+41,RDP02,芦丁(S),STP,kg,first,0
+42,RF02,芦丁A,STP,kg,first,0
+43,RF04,芦丁E,STP,kg,first,0
+44,D/TAF01,曲克芦丁,STP,kg,first,0
+45,D/UAF01,L-鼠李糖,STP,kg,first,0
+46,DHF02,香叶木素,STP,kg,first,0
+47,DHF02,香叶木素,STP,kg,first,0
+48,D/NAF01,新橙皮苷,STP,kg,first,0
+49,D/NCF01,柚苷,STP,kg,first,0
+50,D/NDF01,柚皮苷二氢查耳酮,STP,kg,first,0
+51,CCF01,鹰嘴豆蛋白,STP,kg,first,0
+52,PBF01,根皮素,STP,kg,first,0
+53,PAF01,普鲁宁,STP,kg,first,0
+54,EG01,蛋黄粉(脱脂),STP,kg,first,0
+55,GAF01,染料木素,STP,kg,first,0
+56,HDF01,橙皮素,STP,kg,first,0
+57,GBF01,葡糖基芦丁(AGR),STP,kg,first,0
+58,D/EG02,(鸡)蛋黄粉,STP,kg,first,0
+59,EG02,(鸡)蛋黄粉,STP,kg,first,0
+60,RHF01,白藜芦醇,STP,kg,first,0
+61,LBF01,左旋多巴,STP,kg,first,0
+62,BDF01,苦荞黄酮,STP,kg,first,0
+63,SBF01,甜橙皮提取物,STP,kg,first,0
+64,D/SBF01,甜橙皮提取物,STP,kg,first,0
+65,LCF01,圣草次苷,STP,kg,first,0
+66,AAP01,青蒿素,STP,kg,first,0
+67,ABP01,双氢青蒿素,STP,kg,first,0
+68,ADP01,蒿甲醚,STP,kg,first,0
+69,ACP01,青蒿琥酯,STP,kg,first,0
+70,DAF04,地奥司明,F-STP,kg,first,0
+71,DCF02,地奥司明:橙皮苷(90:10),F-STP,kg,first,0
+72,DCF03,地奥司明:橙皮苷(90:10),F-STP,kg,first,0
+73,DCF04,地奥司明:橙皮苷(90:10),F-STP,kg,first,0
+74,DCF06,地奥司明:橙皮苷(90:10),F-STP,kg,first,0
+75,DDF02,地奥司明:橙皮苷(90:10)微粉,F-STP,kg,first,0
+76,DDF03,地奥司明:橙皮苷(90:10)微粉,F-STP,kg,first,0
+77,DGF01,地奥司明:橙皮苷(90:10)颗粒,F-STP,kg,first,0
+78,LDF01,柠檬黄酮,F-STP,kg,first,0
+79,QHF01,二氢槲皮素,F-STP,kg,first,0
+80,QM02,芦丁水解中和浓缩液,F-STP,kg,first,0
+81,GBF01,葡萄柚黄酮,F-STP,kg,first,0
+82,GBF02,葡萄柚黄酮,F-STP,kg,first,0
+83,GBF03,葡萄柚黄酮,F-STP,kg,first,0
+84,BAF01,盐酸小檗碱,F-STP,kg,first,0
+85,BAF02,盐酸小檗碱,F-STP,kg,first,0
+86,BAF03,盐酸小檗碱,F-STP,kg,first,0
+87,BBF04,盐酸小檗碱颗粒,F-STP,kg,first,0
+88,BBF05,盐酸小檗碱颗粒,F-STP,kg,first,0
+89,BCF03,高密度盐酸小檗碱,F-STP,kg,first,0
+90,D/NBF05,新甲基橙皮苷二氢查耳酮,F-STP,kg,first,0
+91,NBF01,新甲基橙皮苷二氢查耳酮,F-STP,kg,first,0
+92,NBF05,新甲基橙皮苷二氢查耳酮,F-STP,kg,first,0
+93,D/QAF01,二水槲皮素,F-STP,kg,first,0
+94,D/QAF03,二水槲皮素,F-STP,kg,first,0
+95,D/QAF08,二水槲皮素,F-STP,kg,first,0
+96,D/QBF03,二水槲皮素颗粒,F-STP,kg,first,0
+97,D/QDF02,无水槲皮素,F-STP,kg,first,0
+98,D/QDF02,无水槲皮素(HM-02),F-STP,kg,first,0
+99,D/QDF03,无水槲皮素,F-STP,kg,first,0
+100,D/QDF04,无水槲皮素,F-STP,kg,first,0
+101,D/QEF01,无水槲皮素颗粒,F-STP,kg,first,0
+102,QAF01,二水槲皮素,F-STP,kg,first,0
+103,QAF03,二水槲皮素,F-STP,kg,first,0
+104,QAF05,二水槲皮素,F-STP,kg,first,0
+105,QAF08,二水槲皮素,F-STP,kg,first,0
+106,QBF03,二水槲皮素颗粒,F-STP,kg,first,0
+107,QCF02,二水高密度槲皮素,F-STP,kg,first,0
+108,QCF03,二水高密度槲皮素,F-STP,kg,first,0
+109,QCF05,二水高密度槲皮素,F-STP,kg,first,0
+110,QCF06,二水高密度槲皮素,F-STP,kg,first,0
+111,QDF02,无水槲皮素(HM-02),F-STP,kg,first,0
+112,QDF02,无水槲皮素,F-STP,kg,first,0
+113,QDF03,无水槲皮素,F-STP,kg,first,0
+114,QDF04,无水槲皮素,F-STP,kg,first,0
+115,QDF05,无水槲皮素,F-STP,kg,first,0
+116,QEF01,无水槲皮素颗粒,F-STP,kg,first,0
+117,QEF02,无水槲皮素颗粒,F-STP,kg,first,0
+118,QEF03,无水槲皮素颗粒,F-STP,kg,first,0
+119,QEF04,无水槲皮素颗粒,F-STP,kg,first,0
+120,QFF02,无水高密度槲皮素,F-STP,kg,first,0
+121,QFF04,无水高密度槲皮素,F-STP,kg,first,0
+122,QGF01,槐树花浸膏,F-STP,kg,first,0
+123,RGF01,白藜芦醇颗粒,F-STP,kg,first,0
+124,D/IAF01,异槲皮苷,F-STP,kg,first,0
+125,D/IAF02,异槲皮苷,F-STP,kg,first,0
+126,QHF01,二氢槲皮素,F-STP,kg,first,0
+127,IAF01,异槲皮苷,F-STP,kg,first,0
+128,IAF02,异槲皮苷,F-STP,kg,first,0
+129,HAF01,橙皮苷,F-STP,kg,first,0
+130,HAF02,橙皮苷,F-STP,kg,first,0
+131,HAF03,橙皮苷,F-STP,kg,first,0
+132,HAF04,橙皮苷,F-STP,kg,first,0
+133,HBF01,橙皮苷微粉,F-STP,kg,first,0
+134,HBF02,橙皮苷微粉,F-STP,kg,first,0
+135,HBF03,橙皮苷微粉,F-STP,kg,first,0
+136,HBP01,橙皮苷微粉,F-STP,kg,first,0
+137,HCF01,橙皮苷颗粒,F-STP,kg,first,0
+138,HCF02,橙皮苷颗粒,F-STP,kg,first,0
+139,HCF03,橙皮苷颗粒,F-STP,kg,first,0
+140,HAF01,橙皮苷,F-STP,kg,first,0
+141,CAF01,枳实黄酮,F-STP,kg,first,0
+142,CAF02,枳实黄酮,F-STP,kg,first,0
+143,CAF03,枳实黄酮,F-STP,kg,first,0
+144,CAF04,枳实黄酮,F-STP,kg,first,0
+145,CAF05,枳实黄酮,F-STP,kg,first,0
+146,CAF06,枳实黄酮,F-STP,kg,first,0
+147,CAF07,枳实黄酮,F-STP,kg,first,0
+148,CAF08,枳实黄酮,F-STP,kg,first,0
+149,CBF01,枳实黄酮颗粒,F-STP,kg,first,0
+150,CBF02,枳实黄酮颗粒,F-STP,kg,first,0
+151,CBF03,枳实黄酮颗粒,F-STP,kg,first,0
+152,RI01,芦丁(S),F-STP,kg,first,0
+153,RI02,芦丁(S),F-STP,kg,first,0
+154,TAF01,曲克芦丁,F-STP,kg,first,0
+155,TAF03,曲克芦丁,F-STP,kg,first,0
+156,TAF04,曲克芦丁,F-STP,kg,first,0
+157,TBF01,曲克芦丁,F-STP,kg,first,0
+158,RFF01,水溶性芦丁,F-STP,kg,first,0
+159,RAF01,芦丁,F-STP,kg,first,0
+160,RCF01,芦丁,F-STP,kg,first,0
+161,RDF01,芦丁,F-STP,kg,first,0
+162,RDF02,芦丁,F-STP,kg,first,0
+163,RDF03,芦丁,F-STP,kg,first,0
+164,RDF04,芦丁,F-STP,kg,first,0
+165,RDF05,芦丁,F-STP,kg,first,0
+166,REF01,芦丁颗粒,F-STP,kg,first,0
+167,NCF01,柚苷,F-STP,kg,first,0
+168,MBF01,橙皮苷甲基查耳酮,F-STP,kg,first,0
+169,HDF01,橙皮素,F-STP,kg,first,0
+170,NDF01,柚皮苷二氢查耳酮,F-STP,kg,first,0
+171,NGF01,柚皮素,F-STP,kg,first,0
+172,NAF01,新橙皮苷,F-STP,kg,first,0
+173,NAF02,新橙皮苷,F-STP,kg,first,0
+174,DHF01,香叶木素,F-STP,kg,first,0
+175,DHF02,香叶木素,F-STP,kg,first,0
+176,DFF01,地奥司明香叶木素颗粒,F-STP,kg,first,0
+177,DFF02,地奥司明香叶木素颗粒,F-STP,kg,first,0
+178,DEF01,地奥司明颗粒,F-STP,kg,first,0
+179,DEF02,地奥司明颗粒,F-STP,kg,first,0
+180,DEF03,地奥司明颗粒,F-STP,kg,first,0
+181,DEF04,地奥司明颗粒,F-STP,kg,first,0
+182,DFF03,地奥司明A/SG,F-STP,kg,first,0
+183,HFF01,柑橘提取物,F-STP,kg,first,0
+184,D/UAF01,L-鼠李糖,F-STP,kg,first,0
+185,UAF01,L-鼠李糖,F-STP,kg,first,0
+186,NFF01,柚苷颗粒,F-STP,kg,first,0
+187,LUF01,木犀草素,F-STP,kg,first,0
+188,GAF01,染料木素,F-STP,kg,first,0
+189,NGF01,柚皮苷,F-STP,kg,first,0
+190,LCF01,圣草次苷,F-STP,kg,first,0
+191,FAF01,漆黄素,F-STP,kg,first,0

BIN
db.sqlite3


+ 134 - 0
logs/server.log

@@ -12301,3 +12301,137 @@ TypeError: post() missing 1 required positional argument: 'action_type'
 [2025-05-10 17:07:43,786][django.server.handle_error():80] [INFO] - Broken pipe from ('192.168.18.91', 13583)
 [2025-05-10 17:07:43,786][django.server.handle_error():80] [INFO] - Broken pipe from ('192.168.18.91', 5606)
 [2025-05-10 17:07:43,786][django.server.handle_error():80] [INFO] - Broken pipe from ('192.168.18.91', 13582)
+[2025-05-10 17:11:51,728][django.server.log_message():187] [INFO] "OPTIONS /staff/?staff_name=PDA1 HTTP/1.1" 200 0
+[2025-05-10 17:11:51,731][django.server.log_message():187] [INFO] "OPTIONS /warehouse/boundtype/ HTTP/1.1" 200 0
+[2025-05-10 17:11:51,731][django.server.log_message():187] [INFO] "OPTIONS /warehouse/department/ HTTP/1.1" 200 0
+[2025-05-10 17:11:51,731][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?page=1&base_type=0&page_size=11 HTTP/1.1" 200 0
+[2025-05-10 17:11:51,732][django.server.log_message():187] [INFO] "OPTIONS /warehouse/boundcodetype/ HTTP/1.1" 200 0
+[2025-05-10 17:11:51,734][django.server.log_message():187] [INFO] "OPTIONS /warehouse/boundbusiness/ HTTP/1.1" 200 0
+[2025-05-10 17:11:51,736][django.server.log_message():187] [INFO] "OPTIONS /warehouse/multiple/?max_page=30 HTTP/1.1" 200 0
+[2025-05-10 17:11:51,741][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:11:51,744][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:11:51,941][django.server.log_message():187] [INFO] "GET /warehouse/boundtype/ HTTP/1.1" 200 233
+[2025-05-10 17:11:51,979][django.server.log_message():187] [INFO] "GET /warehouse/boundbusiness/ HTTP/1.1" 200 229
+[2025-05-10 17:11:52,021][django.server.log_message():187] [INFO] "GET /warehouse/multiple/?max_page=30 HTTP/1.1" 200 371
+[2025-05-10 17:11:52,022][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?page=1&base_type=0&page_size=11 HTTP/1.1" 200 3969
+[2025-05-10 17:11:52,042][django.server.log_message():187] [INFO] "GET /warehouse/boundcodetype/ HTTP/1.1" 200 250
+[2025-05-10 17:11:52,054][django.server.log_message():187] [INFO] "GET /warehouse/department/ HTTP/1.1" 200 2862
+[2025-05-10 17:11:52,076][django.server.log_message():187] [INFO] "GET /staff/?staff_name=PDA1 HTTP/1.1" 200 286
+[2025-05-10 17:11:52,114][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:11:52,143][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:13:31,657][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:13:31,658][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:13:31,816][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:13:31,855][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:15:11,656][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:15:11,656][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:15:11,810][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:15:11,896][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:16:51,646][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:16:51,664][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:16:51,799][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:16:51,899][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:18:32,574][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:18:32,574][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:18:32,810][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:18:32,810][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:21:02,577][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:21:02,579][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:21:02,621][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:21:02,639][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:22:02,576][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:22:02,576][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:22:02,608][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:22:02,629][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:24:02,580][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:24:02,583][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:24:02,651][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:24:02,680][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:26:02,574][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:26:02,584][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:26:02,660][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:26:02,698][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:27:02,570][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:27:02,570][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:27:02,641][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:27:02,661][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:29:02,569][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:29:02,570][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:29:02,618][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:29:02,638][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:31:02,567][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:31:02,567][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:31:02,625][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:31:02,650][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:32:02,571][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:32:02,572][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:32:02,637][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:32:02,653][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:34:02,570][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:34:02,570][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:34:02,627][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:34:02,647][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:36:02,567][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:36:02,568][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:36:02,645][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:36:02,669][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:37:02,562][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:37:02,572][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:37:02,606][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:37:02,626][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:39:02,576][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:39:02,583][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:39:02,659][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:39:02,691][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:41:02,569][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:41:02,569][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:41:02,632][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:41:02,664][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:42:02,571][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:42:02,576][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:42:02,642][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:42:02,677][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:44:02,567][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:44:02,568][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:44:02,632][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:44:02,657][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:46:02,575][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:46:02,576][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:46:02,652][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:46:02,681][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:47:02,567][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:47:02,574][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:47:02,630][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:47:02,662][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:49:02,564][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:49:02,566][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:49:02,606][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:49:02,622][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:51:02,569][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:51:02,569][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:51:02,643][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:51:02,645][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:52:02,576][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:52:02,581][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:52:02,639][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:52:02,657][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:54:02,573][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:54:02,573][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:54:02,631][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:54:02,654][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:56:02,570][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:56:02,582][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:56:02,647][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 17:56:02,671][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:57:02,578][django.server.log_message():187] [INFO] "OPTIONS /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:57:02,585][django.server.log_message():187] [INFO] "OPTIONS /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 0
+[2025-05-10 17:57:02,663][django.server.log_message():187] [INFO] "GET /wms/outboundBills/?bound_status=0 HTTP/1.1" 200 431
+[2025-05-10 17:57:02,710][django.server.log_message():187] [INFO] "GET /wms/inboundBills/?bound_status=0 HTTP/1.1" 200 52
+[2025-05-10 23:06:30,321][django.server.log_message():187] [INFO] "POST /login/ HTTP/1.1" 200 215
+[2025-05-10 23:19:22,324][django.server.log_message():187] [INFO] "POST /login/ HTTP/1.1" 200 215
+[2025-05-10 23:30:27,897][django.server.log_message():187] [INFO] "POST /container/detail/ HTTP/1.1" 200 149
+[2025-05-10 23:47:21,417][django.server.log_message():187] [INFO] "POST /login/ HTTP/1.1" 200 215
+[2025-05-11 00:51:13,505][django.server.log_message():187] [INFO] "POST /login/ HTTP/1.1" 200 215
+[2025-05-11 01:08:43,909][django.server.log_message():187] [INFO] "POST /login/ HTTP/1.1" 200 215
+[2025-05-11 01:13:22,025][django.server.log_message():187] [INFO] "POST /login/ HTTP/1.1" 200 215
+[2025-05-11 01:15:55,141][django.server.log_message():187] [INFO] "POST /login/ HTTP/1.1" 200 215

+ 8 - 8
templates/src/boot/axios_request.js

@@ -13,22 +13,22 @@ function getBaseUrl (name) {
   return xhr.status === okStatus ? xhr.responseText : null
 }
 // 注意以后修改成服务器的地址
-const baseurl = "http://192.168.30.72:8008"
+const baseurl = 'http://192.168.30.72:8008'
 
 const axiosInstance = axios.create({
-  baseURL: baseurl,
+  baseURL: baseurl
 })
 
 const axiosInstanceVersion = axios.create({
-  baseURL: baseurl,
+  baseURL: baseurl
 })
 
 const axiosInstanceAuth = axios.create({
-  baseURL: baseurl,
+  baseURL: baseurl
 })
 
 const axiosInstanceAuthScan = axios.create({
-  baseURL: baseurl,
+  baseURL: baseurl
 })
 
 var lang = LocalStorage.getItem('lang')
@@ -40,7 +40,7 @@ if (LocalStorage.has('lang')) {
 }
 
 const axiosFile = axios.create({
-  baseURL: baseurl,
+  baseURL: baseurl
 })
 
 axiosInstanceAuth.interceptors.request.use(
@@ -341,8 +341,8 @@ axiosInstance.interceptors.request.use(
     config.headers.post['Content-Type'] = 'application/json, charset="utf-8"'
     config.headers.language = lang
     if (config.method === 'post' || config.method === 'patch' || config.method === 'put' || config.method === 'delete') {
-        Loading.show()
-      }
+      Loading.show()
+    }
     return config
   },
   function (error) {

+ 6 - 6
templates/src/pages/erp/erp.vue

@@ -53,12 +53,12 @@
 
 <script>
 export default {
-  name: "Pageinbound",
-  data() {
+  name: 'Pageinbound',
+  data () {
     return {
-      detaillink: "asn",
-    };
+      detaillink: 'asn'
+    }
   },
-  methods: {},
-};
+  methods: {}
+}
 </script>

+ 350 - 356
templates/src/pages/erp/erpasn.vue

@@ -550,40 +550,37 @@
 <router-view />
 
 <script>
-import { getauth, postauth, putauth, deleteauth, post } from "boot/axios_request";
+import { getauth, postauth, deleteauth } from 'boot/axios_request'
 
-import { date, exportFile, LocalStorage } from "quasar";
-import { QToggle } from "quasar";
+import { date, exportFile, LocalStorage } from 'quasar'
 
 export default {
-  components: {
-    QToggle,
-  },
-  name: "Pageasnlist",
-  data() {
+
+  name: 'Pageasnlist',
+  data () {
     return {
-      createDate2: "",
-      date_range: "",
-      proxyDate: "",
-      date: "",
-      goods_code: "",
-      goods_desc: "",
-      openid: "",
-      login_name: "",
-      authin: "0",
-      warehouse_code: "",
-      warehouse_name: "",
-      searchUrl: "",
-      pathname: "wms/inboundBills/",
-      pathfilename: "bound/file/",
-      pathname_previous: "",
-      pathname_next: "",
-      separator: "cell",
+      createDate2: '',
+      date_range: '',
+      proxyDate: '',
+      date: '',
+      goods_code: '',
+      goods_desc: '',
+      openid: '',
+      login_name: '',
+      authin: '0',
+      warehouse_code: '',
+      warehouse_name: '',
+      searchUrl: '',
+      pathname: 'wms/inboundBills/',
+      pathfilename: 'bound/file/',
+      pathname_previous: '',
+      pathname_next: '',
+      separator: 'cell',
       loading: false,
-      height: "",
+      height: '',
       printObj: {
-        id: "printMe",
-        popTitle: this.$t("inbound.asn"),
+        id: 'printMe',
+        popTitle: this.$t('inbound.asn')
       },
       table_list: [],
       table_detail: {},
@@ -600,31 +597,31 @@ export default {
       product_list: [],
       product_map: [],
       columns: [
-        { name: "detail", label: "详情", field: "detail", align: "center" },
-        { name: "billId", label: "表单序号", field: "billId", align: "center" },
-        { name: "number", label: "单据编号", field: "number", align: "center" },
-        { name: "type", label: "业务类型", field: "type", align: "center" },
+        { name: 'detail', label: '详情', field: 'detail', align: 'center' },
+        { name: 'billId', label: '表单序号', field: 'billId', align: 'center' },
+        { name: 'number', label: '单据编号', field: 'number', align: 'center' },
+        { name: 'type', label: '业务类型', field: 'type', align: 'center' },
         {
-          name: "department",
-          label: "部门",
-          field: "department",
-          align: "center",
+          name: 'department',
+          label: '部门',
+          field: 'department',
+          align: 'center'
         },
-        { name: "date", label: "单据日期", field: "date", align: "center" },
-        { name: "creater", label: "经办人", field: "creater", align: "center" },
+        { name: 'date', label: '单据日期', field: 'date', align: 'center' },
+        { name: 'creater', label: '经办人', field: 'creater', align: 'center' },
         {
-          name: "bound_status",
-          label: "状态",
-          field: "bound_status",
-          align: "center",
+          name: 'bound_status',
+          label: '状态',
+          field: 'bound_status',
+          align: 'center'
         },
-        { name: "action", label: "操作", align: "center" },
+        { name: 'action', label: '操作', align: 'center' }
       ],
-      filter: "",
-      product_filter: "",
+      filter: '',
+      product_filter: '',
       pagination: {
         page: 1,
-        rowsPerPage: 11,
+        rowsPerPage: 11
       },
       newForm: false,
       newBatchForm: false,
@@ -638,527 +635,524 @@ export default {
       detailForm: false,
       deleteid: 0,
       detailid: 0,
-      bar_code: "",
-      error1: this.$t("goods.view_goodslist.error1"),
+      bar_code: '',
+      error1: this.$t('goods.view_goodslist.error1'),
       max: 0,
       total: 0,
       paginationIpt: 1,
       current: 1,
       onlyread: false,
       bound_batch_list: [],
-      activeTab: "tab1",
+      activeTab: 'tab1',
       confirmForm: false,
-      choose_bill_id: "",
-      choose_bill_code: "",
+      choose_bill_id: '',
+      choose_bill_code: '',
       logline: [],
       timeline: [
         {
-          timestamp: "入库汇报",
-          title: "单据编码",
-          content: "暂无",
+          timestamp: '入库汇报',
+          title: '单据编码',
+          content: '暂无',
           expanded: true,
-          type: 1,
+          type: 1
         },
         {
-          timestamp: "入库审核",
-          title: "单据编码",
-          content: "暂无",
+          timestamp: '入库审核',
+          title: '单据编码',
+          content: '暂无',
           expanded: true,
-          type: 2,
+          type: 2
         },
         {
-          timestamp: "入库保存",
-          title: "单据编码",
-          content: "暂无",
+          timestamp: '入库保存',
+          title: '单据编码',
+          content: '暂无',
           expanded: true,
-          type: 3,
-        },
+          type: 3
+        }
       ],
-      detail_type: 0,
-    };
+      detail_type: 0
+    }
   },
   computed: {
-    interval() {
+    interval () {
       return (
-        this.$t("download_center.start") +
-        " - " +
-        this.$t("download_center.end")
-      );
-    },
+        this.$t('download_center.start') +
+        ' - ' +
+        this.$t('download_center.end')
+      )
+    }
   },
   methods: {
-    check_erp(item) {
-      var _this = this;
-      if (item.type == 1) {
-        _this.get_log_list();
-      }
-      else if (item.type == 2) {
-        postauth("wms/boundBills/audit/", { billid: _this.detailid ,billtype: _this.detail_type ,billbase: 0 })
-        .catch((err) => {
-          _this.$q.notify({
-            message: err.detail || "审核失败",
-            icon: "close",
-            color: "negative",
-          });
-        })
-      }
-      else if (item.type == 3) {
-        postauth("wms/boundBills/save/", { billid: _this.detailid ,billtype: _this.detail_type ,billbase: 0 })
+    check_erp (item) {
+      var _this = this
+      if (item.type === 1) {
+        _this.get_log_list()
+      } else if (item.type === 2) {
+        postauth('wms/boundBills/audit/', { billid: _this.detailid, billtype: _this.detail_type, billbase: 0 })
+          .catch((err) => {
+            _this.$q.notify({
+              message: err.detail || '审核失败',
+              icon: 'close',
+              color: 'negative'
+            })
+          })
+      } else if (item.type === 3) {
+        postauth('wms/boundBills/save/', { billid: _this.detailid, billtype: _this.detail_type, billbase: 0 })
       }
-  
     },
-    get_log_list() {
-      var _this = this;
-   
-      getauth("wms/inboundBills/log/?billid=" + _this.detailid)
+    get_log_list () {
+      var _this = this
+
+      getauth('wms/inboundBills/log/?billid=' + _this.detailid)
         .then((res) => {
           if (res && res.results) {
-            _this.logline = res.results;
+            _this.logline = res.results
           } else {
-            console.error("响应中没有 results 属性", res);
+            console.error('响应中没有 results 属性', res)
           }
         })
         .catch((err) => {
           _this.$q.notify({
-            message: err.detail || "获取日志列表时出错",
-            icon: "close",
-            color: "negative",
-          });
-        });
+            message: err.detail || '获取日志列表时出错',
+            icon: 'close',
+            color: 'negative'
+          })
+        })
 
-      postauth("wms/inboundBills/number/", { billid: _this.detailid })
+      postauth('wms/inboundBills/number/', { billid: _this.detailid })
         .then((res) => {
-          _this.timeline[0].title = res.bill_number;
-          _this.timeline[1].title = res.bill_audit;
-          _this.timeline[2].title = res.bill_save;
-          _this.detail_type = res.bill_type;
-          if (res.bill_status == 0) {
-            _this.timeline[0].content = "ERP已发起入库申请,请审核";
-            _this.timeline[1].content = "待质检(非生产入库无需关注)";
-            _this.timeline[2].content = "待保存";
-          } else if (res.bill_status == 1) {
-            _this.timeline[0].content = "ERP已发起入库申请,已审核";
-            _this.timeline[1].content = "已质检或无需质检";
-            _this.timeline[2].content = "待入库";
-          } else if (res.bill_status == 2) {
-            _this.timeline[0].content = "ERP已发起入库申请,已审核";
-            _this.timeline[1].content = "已质检或无需质检";
-            _this.timeline[2].content = "已入库";
+          _this.timeline[0].title = res.bill_number
+          _this.timeline[1].title = res.bill_audit
+          _this.timeline[2].title = res.bill_save
+          _this.detail_type = res.bill_type
+          if (res.bill_status === 0) {
+            _this.timeline[0].content = 'ERP已发起入库申请,请审核'
+            _this.timeline[1].content = '待质检(非生产入库无需关注)'
+            _this.timeline[2].content = '待保存'
+          } else if (res.bill_status === 1) {
+            _this.timeline[0].content = 'ERP已发起入库申请,已审核'
+            _this.timeline[1].content = '已质检或无需质检'
+            _this.timeline[2].content = '待入库'
+          } else if (res.bill_status === 2) {
+            _this.timeline[0].content = 'ERP已发起入库申请,已审核'
+            _this.timeline[1].content = '已质检或无需质检'
+            _this.timeline[2].content = '已入库'
           }
         })
         .catch((err) => {
           _this.$q.notify({
-            message: err.detail || "获取单据编号时出错",
-            icon: "close",
-            color: "negative",
-          });
-        });
+            message: err.detail || '获取单据编号时出错',
+            icon: 'close',
+            color: 'negative'
+          })
+        })
     },
-    formatBSType(type) {
+    formatBSType (type) {
       switch (type) {
         case 1:
-          return "生产入库申请";
+          return '生产入库申请'
         case 2:
-          return "采购入库申请";
+          return '采购入库申请'
         case 3:
-          return "其他入库";
+          return '其他入库'
         case 4:
-          return "调拨入库";
+          return '调拨入库'
 
         default:
-          return "未知";
+          return '未知'
       }
     },
-    formatStatusType(type) {
+    formatStatusType (type) {
       switch (type) {
         case 0:
-          return "待审核";
+          return '待审核'
         case 1:
-          return "确认无误";
+          return '确认无误'
         case 3:
-          return "其他入库";
+          return '其他入库'
         case 4:
-          return "调拨入库";
+          return '调拨入库'
 
         default:
-          return "未知";
+          return '未知'
       }
     },
-    getList(params = {}) {
-      var _this = this;
-      _this.loading = true;
+    getList (params = {}) {
+      var _this = this
+      _this.loading = true
       // 合并基础参数
       const baseParams = {
         page: _this.current,
-        base_type: "0",
-        page_size: _this.pagination.rowsPerPage,
-      };
+        base_type: '0',
+        page_size: _this.pagination.rowsPerPage
+      }
       // 创建URLSearchParams处理参数
       const queryParams = new URLSearchParams({
         ...baseParams,
-        ...params,
-      });
-      console.log(queryParams);
+        ...params
+      })
+      console.log(queryParams)
       // 过滤空值参数
       Array.from(queryParams.entries()).forEach(([key, value]) => {
-        if (value === "" || value === null || value === undefined) {
-          queryParams.delete(key);
+        if (value === '' || value === null || value === undefined) {
+          queryParams.delete(key)
         }
-      });
+      })
       getauth(`${_this.pathname}?${queryParams}`)
         .then((res) => {
-          _this.table_list = res.results;
-          _this.total = res.count;
-          _this.max = Math.ceil(res.count / _this.pagination.rowsPerPage) || 0;
-          _this.pathname_previous = res.previous;
-          _this.pathname_next = res.next;
+          _this.table_list = res.results
+          _this.total = res.count
+          _this.max = Math.ceil(res.count / _this.pagination.rowsPerPage) || 0
+          _this.pathname_previous = res.previous
+          _this.pathname_next = res.next
         })
         .catch((err) => {
           _this.$q.notify({
             message: err.detail,
-            icon: "close",
-            color: "negative",
-          });
+            icon: 'close',
+            color: 'negative'
+          })
         })
         .finally(() => {
-          _this.loading = false;
-        });
+          _this.loading = false
+        })
     },
-    changePageEnter() {
+    changePageEnter () {
       if (Number(this.paginationIpt) < 1) {
-        this.current = 1;
-        this.paginationIpt = 1;
+        this.current = 1
+        this.paginationIpt = 1
       } else if (Number(this.paginationIpt) > this.max) {
-        this.current = this.max;
-        this.paginationIpt = this.max;
+        this.current = this.max
+        this.paginationIpt = this.max
       } else {
-        this.current = Number(this.paginationIpt);
+        this.current = Number(this.paginationIpt)
       }
-      this.getSearchList(this.current);
+      this.getSearchList(this.current)
     },
     // 带搜索条件加载
-    getSearchList(page = 1) {
-      this.current = page;
-      this.paginationIpt = page;
+    getSearchList (page = 1) {
+      this.current = page
+      this.paginationIpt = page
       this.getList({
         number__icontains: this.filter,
-        document_date__range: this.date_range,
-      });
+        document_date__range: this.date_range
+      })
     },
-    getfileList() {
-      var _this = this;
-      _this.loading = true;
+    getfileList () {
+      var _this = this
+      _this.loading = true
       const params = {
         goods_desc__icontains: _this.filter,
-        document_date__range: _this.date_range,
-      };
+        document_date__range: _this.date_range
+      }
       const queryParams = new URLSearchParams({
-        ...params,
-      });
-      console.log(queryParams);
+        ...params
+      })
+      console.log(queryParams)
       // 过滤空值参数
       Array.from(queryParams.entries()).forEach(([key, value]) => {
-        if (value === "" || value === null || value === undefined) {
-          queryParams.delete(key);
+        if (value === '' || value === null || value === undefined) {
+          queryParams.delete(key)
         }
-      });
-      console.log(`${_this.pathfilename}?${queryParams}`);
+      })
+      console.log(`${_this.pathfilename}?${queryParams}`)
       getauth(`${_this.pathfilename}?${queryParams}`)
         .then((res) => {
-          var timeStamp = Date.now();
-          var formattedString = date.formatDate(timeStamp, "YYYYMMDDHHmmss");
+          var timeStamp = Date.now()
+          var formattedString = date.formatDate(timeStamp, 'YYYYMMDDHHmmss')
           const status = exportFile(
-            _this.pathfilename + "list" + formattedString + ".csv",
-            "\uFEFF" + res,
-            "text/csv"
-          );
+            _this.pathfilename + 'list' + formattedString + '.csv',
+            '\uFEFF' + res,
+            'text/csv'
+          )
           if (status !== true) {
             _this.$q.notify({
-              message: "Browser denied file download...",
-              color: "negative",
-              icon: "warning",
-            });
+              message: 'Browser denied file download...',
+              color: 'negative',
+              icon: 'warning'
+            })
           }
         })
         .catch((err) => {
           _this.$q.notify({
             message: err.detail,
-            icon: "close",
-            color: "negative",
-          });
+            icon: 'close',
+            color: 'negative'
+          })
         })
         .finally(() => {
-          _this.loading = false;
-        });
+          _this.loading = false
+        })
     },
 
-    getListPrevious() {
-      var _this = this;
-      if (LocalStorage.has("auth")) {
+    getListPrevious () {
+      var _this = this
+      if (LocalStorage.has('auth')) {
         getauth(_this.pathname_previous, {})
           .then((res) => {
-            _this.table_list = res.results;
-            _this.pathname_previous = res.previous;
-            _this.pathname_next = res.next;
+            _this.table_list = res.results
+            _this.pathname_previous = res.previous
+            _this.pathname_next = res.next
           })
           .catch((err) => {
             _this.$q.notify({
               message: err.detail,
-              icon: "close",
-              color: "negative",
-            });
-          });
+              icon: 'close',
+              color: 'negative'
+            })
+          })
       } else {
       }
     },
-    getListNext() {
-      var _this = this;
-      if (LocalStorage.has("auth")) {
+    getListNext () {
+      var _this = this
+      if (LocalStorage.has('auth')) {
         getauth(_this.pathname_next, {})
           .then((res) => {
-            _this.table_list = res.results;
+            _this.table_list = res.results
 
-            _this.pathname_previous = res.previous;
-            _this.pathname_next = res.next;
+            _this.pathname_previous = res.previous
+            _this.pathname_next = res.next
           })
           .catch((err) => {
             _this.$q.notify({
               message: err.detail,
-              icon: "close",
-              color: "negative",
-            });
-          });
+              icon: 'close',
+              color: 'negative'
+            })
+          })
       }
     },
-    reFresh() {
-      var _this = this;
-      _this.getSearchList();
+    reFresh () {
+      var _this = this
+      _this.getSearchList()
     },
 
-    change_status(e) {
-      var _this = this;
+    change_status (e) {
+      var _this = this
       // _this.loading = true
-      _this.detailData(e);
-      _this.confirmForm = true;
-      _this.choose_bill_id = e.billId;
-      _this.choose_bill_code = e.number;
+      _this.detailData(e)
+      _this.confirmForm = true
+      _this.choose_bill_id = e.billId
+      _this.choose_bill_code = e.number
     },
-    confirm_status() {
-      var _this = this;
-      _this.loading = true;
+    confirm_status () {
+      var _this = this
+      _this.loading = true
       const params = {
-        billId: _this.choose_bill_id,
-      };
-      postauth("wms/generateinbound", params)
+        billId: _this.choose_bill_id
+      }
+      postauth('wms/generateinbound', params)
         .then((res) => {
-          if (res.code == 200) {
+          if (res.code === 200) {
             _this.$q.notify({
-              message: "入库单生成成功,请到入库管理中查看",
-              icon: "check",
-              color: "green",
-            });
+              message: '入库单生成成功,请到入库管理中查看',
+              icon: 'check',
+              color: 'green'
+            })
           }
-          if (res.code == 400) {
+          if (res.code === 400) {
             _this.$q.notify({
               message: res.error,
-              icon: "info",
-              color: "info",
-            });
+              icon: 'info',
+              color: 'info'
+            })
           }
         })
         .finally(() => {
-          _this.loading = false;
-          _this.confirmForm = false;
-          _this.getSearchList();
-        });
+          _this.loading = false
+          _this.confirmForm = false
+          _this.getSearchList()
+        })
     },
 
-    detailData(e) {
-      var _this = this;
-      _this.detailForm = true;
-      _this.detailid = e.billId;
-      console.log("detail查询的id是:", _this.detailid);
-      getauth(_this.pathname + _this.detailid + "/")
+    detailData (e) {
+      var _this = this
+      _this.detailForm = true
+      _this.detailid = e.billId
+      console.log('detail查询的id是:', _this.detailid)
+      getauth(_this.pathname + _this.detailid + '/')
         .then((res) => {
-          _this.table_detail = res;
+          _this.table_detail = res
         })
         .catch((err) => {
           _this.$q.notify({
             message: err.detail,
-            icon: "close",
-            color: "negative",
-          });
-        });
-      console.log("detail查询的结果是:", _this.table_detail);
+            icon: 'close',
+            color: 'negative'
+          })
+        })
+      console.log('detail查询的结果是:', _this.table_detail)
 
-      getauth("wms/materials/?bound_billId=" + _this.detailid)
+      getauth('wms/materials/?bound_billId=' + _this.detailid)
         .then((res) => {
-          _this.batch_detail = res.results;
+          _this.batch_detail = res.results
         })
         .catch((err) => {
           _this.$q.notify({
             message: err.detail,
-            icon: "close",
-            color: "negative",
-          });
-        });
-      console.log("batch查询的结果是:", _this.batch_detail);
-      console.log("batch长度查询的结果是:", _this.batch_detail.length);
-      _this.get_log_list();
+            icon: 'close',
+            color: 'negative'
+          })
+        })
+      console.log('batch查询的结果是:', _this.batch_detail)
+      console.log('batch长度查询的结果是:', _this.batch_detail.length)
+      _this.get_log_list()
     },
-    deleteDataSubmit() {
-      var _this = this;
-      deleteauth(_this.pathname + _this.deleteid + "/")
+    deleteDataSubmit () {
+      var _this = this
+      deleteauth(_this.pathname + _this.deleteid + '/')
         .then((res) => {
-          _this.deleteDataCancel();
-          _this.getSearchList();
+          _this.deleteDataCancel()
+          _this.getSearchList()
           _this.$q.notify({
-            message: "成功删除数据",
-            icon: "check",
-            color: "green",
-          });
+            message: '成功删除数据',
+            icon: 'check',
+            color: 'green'
+          })
         })
         .catch((err) => {
           _this.$q.notify({
             message: err.detail,
-            icon: "close",
-            color: "negative",
-          });
-        });
+            icon: 'close',
+            color: 'negative'
+          })
+        })
     },
-    deleteDataCancel() {
-      var _this = this;
-      _this.deleteForm = false;
-      _this.deleteid = 0;
+    deleteDataCancel () {
+      var _this = this
+      _this.deleteForm = false
+      _this.deleteid = 0
     },
 
-    updateProxy() {
-      var _this = this;
-      _this.proxyDate = _this.date;
-    },
+    updateProxy () {
+      var _this = this
+      _this.proxyDate = _this.date
+    }
   },
-  created() {
-    var _this = this;
-    if (LocalStorage.has("openid")) {
-      _this.openid = LocalStorage.getItem("openid");
+  created () {
+    var _this = this
+    if (LocalStorage.has('openid')) {
+      _this.openid = LocalStorage.getItem('openid')
     } else {
-      _this.openid = "";
-      LocalStorage.set("openid", "");
+      _this.openid = ''
+      LocalStorage.set('openid', '')
     }
-    if (LocalStorage.has("warehouse_code")) {
-      _this.warehouse_code = LocalStorage.getItem("warehouse_code");
+    if (LocalStorage.has('warehouse_code')) {
+      _this.warehouse_code = LocalStorage.getItem('warehouse_code')
     }
-    if (LocalStorage.has("warehouse_name")) {
-      _this.warehouse_name = LocalStorage.getItem("warehouse_name");
+    if (LocalStorage.has('warehouse_name')) {
+      _this.warehouse_name = LocalStorage.getItem('warehouse_name')
     }
-    if (LocalStorage.has("login_name")) {
-      _this.login_name = LocalStorage.getItem("login_name");
+    if (LocalStorage.has('login_name')) {
+      _this.login_name = LocalStorage.getItem('login_name')
     } else {
-      _this.login_name = "";
-      LocalStorage.set("login_name", "");
+      _this.login_name = ''
+      LocalStorage.set('login_name', '')
     }
-    if (LocalStorage.has("auth")) {
-      const timeStamp = Date.now();
-      const formattedString = date.formatDate(timeStamp, "YYYY/MM/DD");
-      _this.date = formattedString;
-      console.log(_this.date);
-      _this.authin = "1";
-      _this.getList();
+    if (LocalStorage.has('auth')) {
+      const timeStamp = Date.now()
+      const formattedString = date.formatDate(timeStamp, 'YYYY/MM/DD')
+      _this.date = formattedString
+      console.log(_this.date)
+      _this.authin = '1'
+      _this.getList()
     } else {
-      _this.authin = "0";
+      _this.authin = '0'
     }
-    getauth("warehouse/boundcodetype/", {})
+    getauth('warehouse/boundcodetype/', {})
       .then((res) => {
         _this.bound_code_type_list = res.results.map((item) => ({
           label: item.bound_code_type_name,
-          value: item.bound_code_type_code,
-        }));
+          value: item.bound_code_type_code
+        }))
         // 编码 → 名称的映射(普通对象,确保响应式)
         _this.bound_code_type_map = res.results.reduce((acc, item) => {
-          acc[item.bound_code_type_code] = item.bound_code_type_name;
-          return acc;
-        }, {});
+          acc[item.bound_code_type_code] = item.bound_code_type_name
+          return acc
+        }, {})
       })
       .catch((err) => {
         _this.$q.notify({
           message: err.detail,
-          icon: "close",
-          color: "negative",
-        });
-      });
+          icon: 'close',
+          color: 'negative'
+        })
+      })
 
-    getauth("warehouse/boundtype/", {})
+    getauth('warehouse/boundtype/', {})
       .then((res) => {
         _this.bound_desc_list = res.results.map((item) => ({
           label: item.bound_type_name,
-          value: item.bound_type_code,
-        }));
+          value: item.bound_type_code
+        }))
         // 编码 → 名称的映射(普通对象,确保响应式)
         _this.bound_desc_map = res.results.reduce((acc, item) => {
-          acc[item.bound_type_code] = item.bound_type_name;
-          return acc;
-        }, {});
+          acc[item.bound_type_code] = item.bound_type_name
+          return acc
+        }, {})
       })
       .catch((err) => {
         _this.$q.notify({
           message: err.detail,
-          icon: "close",
-          color: "negative",
-        });
-      });
+          icon: 'close',
+          color: 'negative'
+        })
+      })
 
-    getauth("warehouse/department/", {})
+    getauth('warehouse/department/', {})
       .then((res) => {
         _this.bound_department_list = res.results.map((item) => ({
           label: item.department_name,
-          value: item.department_code,
-        }));
+          value: item.department_code
+        }))
         _this.bound_department_map = res.results.reduce((acc, item) => {
-          acc[item.department_code] = item.department_name;
-          return acc;
-        }, {});
+          acc[item.department_code] = item.department_name
+          return acc
+        }, {})
       })
       .catch((err) => {
         _this.$q.notify({
           message: err.detail,
-          icon: "close",
-          color: "negative",
-        });
-      });
+          icon: 'close',
+          color: 'negative'
+        })
+      })
 
-    getauth("warehouse/boundbusiness/", {})
+    getauth('warehouse/boundbusiness/', {})
       .then((res) => {
         _this.bound_bs_type_list = res.results.map((item) => ({
           label: item.bound_bs_name,
-          value: item.bound_bs_code,
-        }));
+          value: item.bound_bs_code
+        }))
         // 编码 → 名称的映射(普通对象,确保响应式)
         _this.bound_bs_type_map = res.results.reduce((acc, item) => {
-          acc[item.bound_bs_code] = item.bound_bs_name;
-          return acc;
-        }, {});
+          acc[item.bound_bs_code] = item.bound_bs_name
+          return acc
+        }, {})
       })
       .catch((err) => {
         _this.$q.notify({
           message: err.detail,
-          icon: "close",
-          color: "negative",
-        });
-      });
+          icon: 'close',
+          color: 'negative'
+        })
+      })
   },
 
-  mounted() {
-    var _this = this;
+  mounted () {
+    var _this = this
     if (_this.$q.platform.is.electron) {
-      _this.height = String(_this.$q.screen.height - 290) + "px";
+      _this.height = String(_this.$q.screen.height - 290) + 'px'
     } else {
-      _this.height = _this.$q.screen.height - 290 + "" + "px";
+      _this.height = _this.$q.screen.height - 290 + '' + 'px'
     }
-    _this.newFormData.creater = _this.login_name;
+    _this.newFormData.creater = _this.login_name
   },
-  updated() {},
-  destroyed() {},
-};
+  updated () {},
+  destroyed () {}
+}
 </script>
 <style scoped>
 /* 添加在 <style> 中 */

+ 287 - 290
templates/src/pages/erp/erpasnaudit.vue

@@ -438,43 +438,40 @@
 <router-view />
 
 <script>
-import { getauth, postauth, putauth, deleteauth } from "boot/axios_request";
+import { getauth, postauth, deleteauth } from 'boot/axios_request'
 
-import { date, exportFile, LocalStorage } from "quasar";
-import { QToggle } from "quasar";
+import { date, exportFile, LocalStorage } from 'quasar'
 
 export default {
-  components: {
-    QToggle,
-  },
-  name: "Pageasnlist",
-  data() {
+
+  name: 'Pageasnlist',
+  data () {
     return {
-      createDate2: "",
-      date_range: "",
-      proxyDate: "",
-      date: "",
-      goods_code: "",
-      goods_desc: "",
-      openid: "",
-      login_name: "",
-      authin: "0",
-      warehouse_code: "",
-      warehouse_name: "",
-
-      searchUrl: "",
-      pathname: "wms/inboundBills/",
-      pathfilename: "bound/file/",
-
-      pathname_previous: "",
-      pathname_next: "",
-      separator: "cell",
+      createDate2: '',
+      date_range: '',
+      proxyDate: '',
+      date: '',
+      goods_code: '',
+      goods_desc: '',
+      openid: '',
+      login_name: '',
+      authin: '0',
+      warehouse_code: '',
+      warehouse_name: '',
+
+      searchUrl: '',
+      pathname: 'wms/inboundBills/',
+      pathfilename: 'bound/file/',
+
+      pathname_previous: '',
+      pathname_next: '',
+      separator: 'cell',
       loading: false,
-      height: "",
+      height: '',
 
       printObj: {
-        id: "printMe",
-        popTitle: this.$t("inbound.asn"),
+        id: 'printMe',
+        popTitle: this.$t('inbound.asn')
       },
       table_list: [],
       table_detail: {},
@@ -493,31 +490,31 @@ export default {
       product_map: [],
 
       columns: [
-        { name: "detail", label: "详情", field: "detail", align: "center" },
-        { name: "billId", label: "表单序号", field: "billId", align: "center" },
-        { name: "number", label: "单据编号", field: "number", align: "center" },
-        { name: "type", label: "业务类型", field: "type", align: "center" },
+        { name: 'detail', label: '详情', field: 'detail', align: 'center' },
+        { name: 'billId', label: '表单序号', field: 'billId', align: 'center' },
+        { name: 'number', label: '单据编号', field: 'number', align: 'center' },
+        { name: 'type', label: '业务类型', field: 'type', align: 'center' },
         {
-          name: "department",
-          label: "部门",
-          field: "department",
-          align: "center",
+          name: 'department',
+          label: '部门',
+          field: 'department',
+          align: 'center'
         },
-        { name: "date", label: "单据日期", field: "date", align: "center" },
-        { name: "creater", label: "经办人", field: "creater", align: "center" },
+        { name: 'date', label: '单据日期', field: 'date', align: 'center' },
+        { name: 'creater', label: '经办人', field: 'creater', align: 'center' },
         {
-          name: "bound_status",
-          label: "状态",
-          field: "bound_status",
-          align: "center",
+          name: 'bound_status',
+          label: '状态',
+          field: 'bound_status',
+          align: 'center'
         },
-        { name: "action", label: "操作", align: "center" },
+        { name: 'action', label: '操作', align: 'center' }
       ],
-      filter: "",
-      product_filter: "",
+      filter: '',
+      product_filter: '',
       pagination: {
         page: 1,
-        rowsPerPage: 11,
+        rowsPerPage: 11
       },
       newForm: false,
       newBatchForm: false,
@@ -531,8 +528,8 @@ export default {
       detailForm: false,
       deleteid: 0,
       detailid: 0,
-      bar_code: "",
-      error1: this.$t("goods.view_goodslist.error1"),
+      bar_code: '',
+      error1: this.$t('goods.view_goodslist.error1'),
 
       max: 0,
       total: 0,
@@ -540,430 +537,430 @@ export default {
       current: 1,
       onlyread: false,
       bound_batch_list: [],
-      activeTab: "tab1",
+      activeTab: 'tab1',
       confirmForm: false,
-      choose_bill_id: "",
-      choose_bill_code: "",
-    };
+      choose_bill_id: '',
+      choose_bill_code: ''
+    }
   },
   computed: {
-    interval() {
+    interval () {
       return (
-        this.$t("download_center.start") +
-        " - " +
-        this.$t("download_center.end")
-      );
-    },
+        this.$t('download_center.start') +
+        ' - ' +
+        this.$t('download_center.end')
+      )
+    }
   },
   methods: {
-    formatBSType(type) {
+    formatBSType (type) {
       switch (type) {
         case 1:
-          return "生产入库申请";
+          return '生产入库申请'
         case 2:
-          return "采购入库申请";
+          return '采购入库申请'
         case 3:
-          return "其他入库";
+          return '其他入库'
         case 4:
-          return "调拨入库";
+          return '调拨入库'
 
         default:
-          return "未知";
+          return '未知'
       }
     },
-    formatStatusType(type) {
+    formatStatusType (type) {
       switch (type) {
         case 0:
-          return "待审核";
+          return '待审核'
         case 1:
-          return "确认无误";
+          return '确认无误'
         case 3:
-          return "其他入库";
+          return '其他入库'
         case 4:
-          return "调拨入库";
+          return '调拨入库'
 
         default:
-          return "未知";
+          return '未知'
       }
     },
-    getList(params = {}) {
-      var _this = this;
-      _this.loading = true;
+    getList (params = {}) {
+      var _this = this
+      _this.loading = true
       // 合并基础参数
       const baseParams = {
         page: _this.current,
-        base_type: "0",
-        page_size: _this.pagination.rowsPerPage,
-      };
+        base_type: '0',
+        page_size: _this.pagination.rowsPerPage
+      }
 
       // 创建URLSearchParams处理参数
       const queryParams = new URLSearchParams({
         ...baseParams,
-        ...params,
-      });
-      console.log(queryParams);
+        ...params
+      })
+      console.log(queryParams)
       // 过滤空值参数
       Array.from(queryParams.entries()).forEach(([key, value]) => {
-        if (value === "" || value === null || value === undefined) {
-          queryParams.delete(key);
+        if (value === '' || value === null || value === undefined) {
+          queryParams.delete(key)
         }
-      });
+      })
 
       getauth(`${_this.pathname}?${queryParams}`)
         .then((res) => {
-          _this.table_list = res.results;
+          _this.table_list = res.results
 
-          _this.total = res.count;
-          _this.max = Math.ceil(res.count / _this.pagination.rowsPerPage) || 0;
-          _this.pathname_previous = res.previous;
-          _this.pathname_next = res.next;
+          _this.total = res.count
+          _this.max = Math.ceil(res.count / _this.pagination.rowsPerPage) || 0
+          _this.pathname_previous = res.previous
+          _this.pathname_next = res.next
         })
         .catch((err) => {
           _this.$q.notify({
             message: err.detail,
-            icon: "close",
-            color: "negative",
-          });
+            icon: 'close',
+            color: 'negative'
+          })
         })
         .finally(() => {
-          _this.loading = false;
-        });
+          _this.loading = false
+        })
     },
-    changePageEnter() {
+    changePageEnter () {
       if (Number(this.paginationIpt) < 1) {
-        this.current = 1;
-        this.paginationIpt = 1;
+        this.current = 1
+        this.paginationIpt = 1
       } else if (Number(this.paginationIpt) > this.max) {
-        this.current = this.max;
-        this.paginationIpt = this.max;
+        this.current = this.max
+        this.paginationIpt = this.max
       } else {
-        this.current = Number(this.paginationIpt);
+        this.current = Number(this.paginationIpt)
       }
-      this.getSearchList(this.current);
+      this.getSearchList(this.current)
     },
 
     // 带搜索条件加载
-    getSearchList(page = 1) {
-      this.current = page;
-      this.paginationIpt = page;
+    getSearchList (page = 1) {
+      this.current = page
+      this.paginationIpt = page
       this.getList({
         number__icontains: this.filter,
-        document_date__range: this.date_range,
-      });
+        document_date__range: this.date_range
+      })
     },
-    getfileList() {
-      var _this = this;
-      _this.loading = true;
+    getfileList () {
+      var _this = this
+      _this.loading = true
       const params = {
         goods_desc__icontains: _this.filter,
-        document_date__range: _this.date_range,
-      };
+        document_date__range: _this.date_range
+      }
       const queryParams = new URLSearchParams({
-        ...params,
-      });
-      console.log(queryParams);
+        ...params
+      })
+      console.log(queryParams)
       // 过滤空值参数
       Array.from(queryParams.entries()).forEach(([key, value]) => {
-        if (value === "" || value === null || value === undefined) {
-          queryParams.delete(key);
+        if (value === '' || value === null || value === undefined) {
+          queryParams.delete(key)
         }
-      });
-      console.log(`${_this.pathfilename}?${queryParams}`);
+      })
+      console.log(`${_this.pathfilename}?${queryParams}`)
       getauth(`${_this.pathfilename}?${queryParams}`)
         .then((res) => {
-          var timeStamp = Date.now();
-          var formattedString = date.formatDate(timeStamp, "YYYYMMDDHHmmss");
+          var timeStamp = Date.now()
+          var formattedString = date.formatDate(timeStamp, 'YYYYMMDDHHmmss')
           const status = exportFile(
-            _this.pathfilename + "list" + formattedString + ".csv",
-            "\uFEFF" + res,
-            "text/csv"
-          );
+            _this.pathfilename + 'list' + formattedString + '.csv',
+            '\uFEFF' + res,
+            'text/csv'
+          )
           if (status !== true) {
             _this.$q.notify({
-              message: "Browser denied file download...",
-              color: "negative",
-              icon: "warning",
-            });
+              message: 'Browser denied file download...',
+              color: 'negative',
+              icon: 'warning'
+            })
           }
         })
         .catch((err) => {
           _this.$q.notify({
             message: err.detail,
-            icon: "close",
-            color: "negative",
-          });
+            icon: 'close',
+            color: 'negative'
+          })
         })
         .finally(() => {
-          _this.loading = false;
-        });
+          _this.loading = false
+        })
     },
 
-    getListPrevious() {
-      var _this = this;
-      if (LocalStorage.has("auth")) {
+    getListPrevious () {
+      var _this = this
+      if (LocalStorage.has('auth')) {
         getauth(_this.pathname_previous, {})
           .then((res) => {
-            _this.table_list = res.results;
-            _this.pathname_previous = res.previous;
-            _this.pathname_next = res.next;
+            _this.table_list = res.results
+            _this.pathname_previous = res.previous
+            _this.pathname_next = res.next
           })
           .catch((err) => {
             _this.$q.notify({
               message: err.detail,
-              icon: "close",
-              color: "negative",
-            });
-          });
+              icon: 'close',
+              color: 'negative'
+            })
+          })
       } else {
       }
     },
-    getListNext() {
-      var _this = this;
-      if (LocalStorage.has("auth")) {
+    getListNext () {
+      var _this = this
+      if (LocalStorage.has('auth')) {
         getauth(_this.pathname_next, {})
           .then((res) => {
-            _this.table_list = res.results;
+            _this.table_list = res.results
 
-            _this.pathname_previous = res.previous;
-            _this.pathname_next = res.next;
+            _this.pathname_previous = res.previous
+            _this.pathname_next = res.next
           })
           .catch((err) => {
             _this.$q.notify({
               message: err.detail,
-              icon: "close",
-              color: "negative",
-            });
-          });
+              icon: 'close',
+              color: 'negative'
+            })
+          })
       }
     },
-    reFresh() {
-      var _this = this;
-      _this.getSearchList();
+    reFresh () {
+      var _this = this
+      _this.getSearchList()
     },
 
-    change_status(e) {
-      var _this = this;
+    change_status (e) {
+      var _this = this
       // _this.loading = true
-      _this.detailData(e);
-      _this.confirmForm = true;
-      _this.choose_bill_id = e.billId;
-      _this.choose_bill_code = e.number;
+      _this.detailData(e)
+      _this.confirmForm = true
+      _this.choose_bill_id = e.billId
+      _this.choose_bill_code = e.number
     },
-    confirm_status() {
-      var _this = this;
-      _this.loading = true;
+    confirm_status () {
+      var _this = this
+      _this.loading = true
       const params = {
-        billId: _this.choose_bill_id,
-      };
-      postauth("wms/generateinbound", params)
+        billId: _this.choose_bill_id
+      }
+      postauth('wms/generateinbound', params)
         .then((res) => {
           if (res.code == 200) {
             _this.$q.notify({
-              message: "入库单生成成功,请到入库管理中查看",
-              icon: "check",
-              color: "green",
-            });
+              message: '入库单生成成功,请到入库管理中查看',
+              icon: 'check',
+              color: 'green'
+            })
           }
           if (res.code == 400) {
             _this.$q.notify({
               message: res.error,
-              icon: "info",
-              color: "info",
-            });
+              icon: 'info',
+              color: 'info'
+            })
           }
         })
         .finally(() => {
-          _this.loading = false;
-          _this.confirmForm = false;
-          _this.getSearchList();
-        });
+          _this.loading = false
+          _this.confirmForm = false
+          _this.getSearchList()
+        })
     },
 
-    detailData(e) {
-      var _this = this;
-      _this.detailForm = true;
-      _this.detailid = e.billId;
-      console.log("detail查询的id是:", _this.detailid);
-      getauth(_this.pathname + _this.detailid + "/")
+    detailData (e) {
+      var _this = this
+      _this.detailForm = true
+      _this.detailid = e.billId
+      console.log('detail查询的id是:', _this.detailid)
+      getauth(_this.pathname + _this.detailid + '/')
         .then((res) => {
-          _this.table_detail = res;
+          _this.table_detail = res
         })
         .catch((err) => {
           _this.$q.notify({
             message: err.detail,
-            icon: "close",
-            color: "negative",
-          });
-        });
-      console.log("detail查询的结果是:", _this.table_detail);
+            icon: 'close',
+            color: 'negative'
+          })
+        })
+      console.log('detail查询的结果是:', _this.table_detail)
 
-      getauth("wms/materials/?bound_billId=" + _this.detailid)
+      getauth('wms/materials/?bound_billId=' + _this.detailid)
         .then((res) => {
-          _this.batch_detail = res.results;
+          _this.batch_detail = res.results
         })
         .catch((err) => {
           _this.$q.notify({
             message: err.detail,
-            icon: "close",
-            color: "negative",
-          });
-        });
-      console.log("batch查询的结果是:", _this.batch_detail);
-      console.log("batch长度查询的结果是:", _this.batch_detail.length);
+            icon: 'close',
+            color: 'negative'
+          })
+        })
+      console.log('batch查询的结果是:', _this.batch_detail)
+      console.log('batch长度查询的结果是:', _this.batch_detail.length)
     },
-    deleteDataSubmit() {
-      var _this = this;
-      deleteauth(_this.pathname + _this.deleteid + "/")
+    deleteDataSubmit () {
+      var _this = this
+      deleteauth(_this.pathname + _this.deleteid + '/')
         .then((res) => {
-          _this.deleteDataCancel();
-          _this.getSearchList();
+          _this.deleteDataCancel()
+          _this.getSearchList()
           _this.$q.notify({
-            message: "成功删除数据",
-            icon: "check",
-            color: "green",
-          });
+            message: '成功删除数据',
+            icon: 'check',
+            color: 'green'
+          })
         })
         .catch((err) => {
           _this.$q.notify({
             message: err.detail,
-            icon: "close",
-            color: "negative",
-          });
-        });
+            icon: 'close',
+            color: 'negative'
+          })
+        })
     },
-    deleteDataCancel() {
-      var _this = this;
-      _this.deleteForm = false;
-      _this.deleteid = 0;
+    deleteDataCancel () {
+      var _this = this
+      _this.deleteForm = false
+      _this.deleteid = 0
     },
 
-    updateProxy() {
-      var _this = this;
-      _this.proxyDate = _this.date;
-    },
+    updateProxy () {
+      var _this = this
+      _this.proxyDate = _this.date
+    }
   },
-  created() {
-    var _this = this;
-    if (LocalStorage.has("openid")) {
-      _this.openid = LocalStorage.getItem("openid");
+  created () {
+    var _this = this
+    if (LocalStorage.has('openid')) {
+      _this.openid = LocalStorage.getItem('openid')
     } else {
-      _this.openid = "";
-      LocalStorage.set("openid", "");
+      _this.openid = ''
+      LocalStorage.set('openid', '')
     }
-    if (LocalStorage.has("warehouse_code")) {
-      _this.warehouse_code = LocalStorage.getItem("warehouse_code");
+    if (LocalStorage.has('warehouse_code')) {
+      _this.warehouse_code = LocalStorage.getItem('warehouse_code')
     }
-    if (LocalStorage.has("warehouse_name")) {
-      _this.warehouse_name = LocalStorage.getItem("warehouse_name");
+    if (LocalStorage.has('warehouse_name')) {
+      _this.warehouse_name = LocalStorage.getItem('warehouse_name')
     }
-    if (LocalStorage.has("login_name")) {
-      _this.login_name = LocalStorage.getItem("login_name");
+    if (LocalStorage.has('login_name')) {
+      _this.login_name = LocalStorage.getItem('login_name')
     } else {
-      _this.login_name = "";
-      LocalStorage.set("login_name", "");
+      _this.login_name = ''
+      LocalStorage.set('login_name', '')
     }
-    if (LocalStorage.has("auth")) {
-      const timeStamp = Date.now();
-      const formattedString = date.formatDate(timeStamp, "YYYY/MM/DD");
-      _this.date = formattedString;
-      console.log(_this.date);
-      _this.authin = "1";
-      _this.getList();
+    if (LocalStorage.has('auth')) {
+      const timeStamp = Date.now()
+      const formattedString = date.formatDate(timeStamp, 'YYYY/MM/DD')
+      _this.date = formattedString
+      console.log(_this.date)
+      _this.authin = '1'
+      _this.getList()
     } else {
-      _this.authin = "0";
+      _this.authin = '0'
     }
-    getauth("warehouse/boundcodetype/", {})
+    getauth('warehouse/boundcodetype/', {})
       .then((res) => {
         _this.bound_code_type_list = res.results.map((item) => ({
           label: item.bound_code_type_name,
-          value: item.bound_code_type_code,
-        }));
+          value: item.bound_code_type_code
+        }))
         // 编码 → 名称的映射(普通对象,确保响应式)
         _this.bound_code_type_map = res.results.reduce((acc, item) => {
-          acc[item.bound_code_type_code] = item.bound_code_type_name;
-          return acc;
-        }, {});
+          acc[item.bound_code_type_code] = item.bound_code_type_name
+          return acc
+        }, {})
       })
       .catch((err) => {
         _this.$q.notify({
           message: err.detail,
-          icon: "close",
-          color: "negative",
-        });
-      });
+          icon: 'close',
+          color: 'negative'
+        })
+      })
 
-    getauth("warehouse/boundtype/", {})
+    getauth('warehouse/boundtype/', {})
       .then((res) => {
         _this.bound_desc_list = res.results.map((item) => ({
           label: item.bound_type_name,
-          value: item.bound_type_code,
-        }));
+          value: item.bound_type_code
+        }))
         // 编码 → 名称的映射(普通对象,确保响应式)
         _this.bound_desc_map = res.results.reduce((acc, item) => {
-          acc[item.bound_type_code] = item.bound_type_name;
-          return acc;
-        }, {});
+          acc[item.bound_type_code] = item.bound_type_name
+          return acc
+        }, {})
       })
       .catch((err) => {
         _this.$q.notify({
           message: err.detail,
-          icon: "close",
-          color: "negative",
-        });
-      });
+          icon: 'close',
+          color: 'negative'
+        })
+      })
 
-    getauth("warehouse/department/", {})
+    getauth('warehouse/department/', {})
       .then((res) => {
         _this.bound_department_list = res.results.map((item) => ({
           label: item.department_name,
-          value: item.department_code,
-        }));
+          value: item.department_code
+        }))
         _this.bound_department_map = res.results.reduce((acc, item) => {
-          acc[item.department_code] = item.department_name;
-          return acc;
-        }, {});
+          acc[item.department_code] = item.department_name
+          return acc
+        }, {})
       })
       .catch((err) => {
         _this.$q.notify({
           message: err.detail,
-          icon: "close",
-          color: "negative",
-        });
-      });
+          icon: 'close',
+          color: 'negative'
+        })
+      })
 
-    getauth("warehouse/boundbusiness/", {})
+    getauth('warehouse/boundbusiness/', {})
       .then((res) => {
         _this.bound_bs_type_list = res.results.map((item) => ({
           label: item.bound_bs_name,
-          value: item.bound_bs_code,
-        }));
+          value: item.bound_bs_code
+        }))
         // 编码 → 名称的映射(普通对象,确保响应式)
         _this.bound_bs_type_map = res.results.reduce((acc, item) => {
-          acc[item.bound_bs_code] = item.bound_bs_name;
-          return acc;
-        }, {});
+          acc[item.bound_bs_code] = item.bound_bs_name
+          return acc
+        }, {})
       })
       .catch((err) => {
         _this.$q.notify({
           message: err.detail,
-          icon: "close",
-          color: "negative",
-        });
-      });
+          icon: 'close',
+          color: 'negative'
+        })
+      })
   },
 
-  mounted() {
-    var _this = this;
+  mounted () {
+    var _this = this
     if (_this.$q.platform.is.electron) {
-      _this.height = String(_this.$q.screen.height - 290) + "px";
+      _this.height = String(_this.$q.screen.height - 290) + 'px'
     } else {
-      _this.height = _this.$q.screen.height - 290 + "" + "px";
+      _this.height = _this.$q.screen.height - 290 + '' + 'px'
     }
-    _this.newFormData.creater = _this.login_name;
+    _this.newFormData.creater = _this.login_name
   },
-  updated() {},
-  destroyed() {},
-};
+  updated () {},
+  destroyed () {}
+}
 </script>
 <style scoped>
 /* 添加在 <style> 中 */

+ 285 - 286
templates/src/pages/erp/erpdn.vue

@@ -436,43 +436,42 @@
 <router-view />
 
 <script>
-import { getauth, postauth, putauth, deleteauth } from "boot/axios_request";
+import { getauth, postauth, putauth, deleteauth } from 'boot/axios_request'
 
-import { date, exportFile, LocalStorage } from "quasar";
-import { QToggle } from "quasar";
+import { date, exportFile, LocalStorage, QToggle } from 'quasar'
 
 export default {
   components: {
-    QToggle,
+    QToggle
   },
-  name: "Pageasnlist",
-  data() {
+  name: 'Pageasnlist',
+  data () {
     return {
-      createDate2: "",
-      date_range: "",
-      proxyDate: "",
-      date: "",
-      goods_code: "",
-      goods_desc: "",
-      openid: "",
-      login_name: "",
-      authin: "0",
-      warehouse_code: "",
-      warehouse_name: "",
-
-      searchUrl: "",
-      pathname: "wms/outboundBills/",
-      pathfilename: "bound/file/",
-
-      pathname_previous: "",
-      pathname_next: "",
-      separator: "cell",
+      createDate2: '',
+      date_range: '',
+      proxyDate: '',
+      date: '',
+      goods_code: '',
+      goods_desc: '',
+      openid: '',
+      login_name: '',
+      authin: '0',
+      warehouse_code: '',
+      warehouse_name: '',
+
+      searchUrl: '',
+      pathname: 'wms/outboundBills/',
+      pathfilename: 'bound/file/',
+
+      pathname_previous: '',
+      pathname_next: '',
+      separator: 'cell',
       loading: false,
-      height: "",
+      height: '',
 
       printObj: {
-        id: "printMe",
-        popTitle: this.$t("inbound.asn"),
+        id: 'printMe',
+        popTitle: this.$t('inbound.asn')
       },
       table_list: [],
       table_detail: {},
@@ -491,31 +490,31 @@ export default {
       product_map: [],
 
       columns: [
-        { name: "detail", label: "详情", field: "detail", align: "center" },
-        { name: "billId", label: "表单序号", field: "billId", align: "center" },
-        { name: "number", label: "单据编号", field: "number", align: "center" },
-        { name: "type", label: "业务类型", field: "type", align: "center" },
+        { name: 'detail', label: '详情', field: 'detail', align: 'center' },
+        { name: 'billId', label: '表单序号', field: 'billId', align: 'center' },
+        { name: 'number', label: '单据编号', field: 'number', align: 'center' },
+        { name: 'type', label: '业务类型', field: 'type', align: 'center' },
         {
-          name: "department",
-          label: "部门",
-          field: "department",
-          align: "center",
+          name: 'department',
+          label: '部门',
+          field: 'department',
+          align: 'center'
         },
-        { name: "date", label: "单据日期", field: "date", align: "center" },
-        { name: "creater", label: "经办人", field: "creater", align: "center" },
+        { name: 'date', label: '单据日期', field: 'date', align: 'center' },
+        { name: 'creater', label: '经办人', field: 'creater', align: 'center' },
         {
-          name: "bound_status",
-          label: "状态",
-          field: "bound_status",
-          align: "center",
+          name: 'bound_status',
+          label: '状态',
+          field: 'bound_status',
+          align: 'center'
         },
-        { name: "action", label: "操作", align: "center" },
+        { name: 'action', label: '操作', align: 'center' }
       ],
-      filter: "",
-      product_filter: "",
+      filter: '',
+      product_filter: '',
       pagination: {
         page: 1,
-        rowsPerPage: 11,
+        rowsPerPage: 11
       },
       newForm: false,
       newBatchForm: false,
@@ -529,8 +528,8 @@ export default {
       detailForm: false,
       deleteid: 0,
       detailid: 0,
-      bar_code: "",
-      error1: this.$t("goods.view_goodslist.error1"),
+      bar_code: '',
+      error1: this.$t('goods.view_goodslist.error1'),
 
       max: 0,
       total: 0,
@@ -538,426 +537,426 @@ export default {
       current: 1,
       onlyread: false,
       bound_batch_list: [],
-      activeTab: "tab1",
+      activeTab: 'tab1',
       confirmForm: false,
-      choose_bill_id: "",
-      choose_bill_code: "",
-    };
+      choose_bill_id: '',
+      choose_bill_code: ''
+    }
   },
   computed: {
-    interval() {
+    interval () {
       return (
-        this.$t("download_center.start") +
-        " - " +
-        this.$t("download_center.end")
-      );
-    },
+        this.$t('download_center.start') +
+        ' - ' +
+        this.$t('download_center.end')
+      )
+    }
   },
   methods: {
-    formatBSType(type) {
+    formatBSType (type) {
       switch (type) {
         case 1:
-          return "销售出库申请";
+          return '销售出库申请'
         case 2:
-          return "生产领料申请";
+          return '生产领料申请'
         case 3:
-          return "其他出库申请";
+          return '其他出库申请'
         default:
-          return "未知";
+          return '未知'
       }
     },
-    formatStatusType(type) {
+    formatStatusType (type) {
       switch (type) {
         case 0:
-          return "待审核";
+          return '待审核'
         case 1:
-          return "确认无误";
+          return '确认无误'
         case 3:
-          return "其他入库";
+          return '其他入库'
         case 4:
-          return "调拨入库";
+          return '调拨入库'
 
         default:
-          return "未知";
+          return '未知'
       }
     },
-    getList(params = {}) {
-      var _this = this;
-      _this.loading = true;
+    getList (params = {}) {
+      var _this = this
+      _this.loading = true
       // 合并基础参数
       const baseParams = {
         page: _this.current,
-        base_type: "0",
-        page_size: _this.pagination.rowsPerPage,
-      };
+        base_type: '0',
+        page_size: _this.pagination.rowsPerPage
+      }
 
       // 创建URLSearchParams处理参数
       const queryParams = new URLSearchParams({
         ...baseParams,
-        ...params,
-      });
-      console.log(queryParams);
+        ...params
+      })
+      console.log(queryParams)
       // 过滤空值参数
       Array.from(queryParams.entries()).forEach(([key, value]) => {
-        if (value === "" || value === null || value === undefined) {
-          queryParams.delete(key);
+        if (value === '' || value === null || value === undefined) {
+          queryParams.delete(key)
         }
-      });
+      })
 
       getauth(`${_this.pathname}?${queryParams}`)
         .then((res) => {
-          _this.table_list = res.results;
+          _this.table_list = res.results
 
-          _this.total = res.count;
-          _this.max = Math.ceil(res.count / _this.pagination.rowsPerPage) || 0;
-          _this.pathname_previous = res.previous;
-          _this.pathname_next = res.next;
+          _this.total = res.count
+          _this.max = Math.ceil(res.count / _this.pagination.rowsPerPage) || 0
+          _this.pathname_previous = res.previous
+          _this.pathname_next = res.next
         })
         .catch((err) => {
           _this.$q.notify({
             message: err.detail,
-            icon: "close",
-            color: "negative",
-          });
+            icon: 'close',
+            color: 'negative'
+          })
         })
         .finally(() => {
-          _this.loading = false;
-        });
+          _this.loading = false
+        })
     },
-    changePageEnter() {
+    changePageEnter () {
       if (Number(this.paginationIpt) < 1) {
-        this.current = 1;
-        this.paginationIpt = 1;
+        this.current = 1
+        this.paginationIpt = 1
       } else if (Number(this.paginationIpt) > this.max) {
-        this.current = this.max;
-        this.paginationIpt = this.max;
+        this.current = this.max
+        this.paginationIpt = this.max
       } else {
-        this.current = Number(this.paginationIpt);
+        this.current = Number(this.paginationIpt)
       }
-      this.getSearchList(this.current);
+      this.getSearchList(this.current)
     },
 
     // 带搜索条件加载
-    getSearchList(page = 1) {
-      this.current = page;
-      this.paginationIpt = page;
+    getSearchList (page = 1) {
+      this.current = page
+      this.paginationIpt = page
       this.getList({
         number__icontains: this.filter,
-        document_date__range: this.date_range,
-      });
+        document_date__range: this.date_range
+      })
     },
-    getfileList() {
-      var _this = this;
-      _this.loading = true;
+    getfileList () {
+      var _this = this
+      _this.loading = true
       const params = {
         goods_desc__icontains: _this.filter,
-        document_date__range: _this.date_range,
-      };
+        document_date__range: _this.date_range
+      }
       const queryParams = new URLSearchParams({
-        ...params,
-      });
-      console.log(queryParams);
+        ...params
+      })
+      console.log(queryParams)
       // 过滤空值参数
       Array.from(queryParams.entries()).forEach(([key, value]) => {
-        if (value === "" || value === null || value === undefined) {
-          queryParams.delete(key);
+        if (value === '' || value === null || value === undefined) {
+          queryParams.delete(key)
         }
-      });
-      console.log(`${_this.pathfilename}?${queryParams}`);
+      })
+      console.log(`${_this.pathfilename}?${queryParams}`)
       getauth(`${_this.pathfilename}?${queryParams}`)
         .then((res) => {
-          var timeStamp = Date.now();
-          var formattedString = date.formatDate(timeStamp, "YYYYMMDDHHmmss");
+          var timeStamp = Date.now()
+          var formattedString = date.formatDate(timeStamp, 'YYYYMMDDHHmmss')
           const status = exportFile(
-            _this.pathfilename + "list" + formattedString + ".csv",
-            "\uFEFF" + res,
-            "text/csv"
-          );
+            _this.pathfilename + 'list' + formattedString + '.csv',
+            '\uFEFF' + res,
+            'text/csv'
+          )
           if (status !== true) {
             _this.$q.notify({
-              message: "Browser denied file download...",
-              color: "negative",
-              icon: "warning",
-            });
+              message: 'Browser denied file download...',
+              color: 'negative',
+              icon: 'warning'
+            })
           }
         })
         .catch((err) => {
           _this.$q.notify({
             message: err.detail,
-            icon: "close",
-            color: "negative",
-          });
+            icon: 'close',
+            color: 'negative'
+          })
         })
         .finally(() => {
-          _this.loading = false;
-        });
+          _this.loading = false
+        })
     },
 
-    getListPrevious() {
-      var _this = this;
-      if (LocalStorage.has("auth")) {
+    getListPrevious () {
+      var _this = this
+      if (LocalStorage.has('auth')) {
         getauth(_this.pathname_previous, {})
           .then((res) => {
-            _this.table_list = res.results;
-            _this.pathname_previous = res.previous;
-            _this.pathname_next = res.next;
+            _this.table_list = res.results
+            _this.pathname_previous = res.previous
+            _this.pathname_next = res.next
           })
           .catch((err) => {
             _this.$q.notify({
               message: err.detail,
-              icon: "close",
-              color: "negative",
-            });
-          });
+              icon: 'close',
+              color: 'negative'
+            })
+          })
       } else {
       }
     },
-    getListNext() {
-      var _this = this;
-      if (LocalStorage.has("auth")) {
+    getListNext () {
+      var _this = this
+      if (LocalStorage.has('auth')) {
         getauth(_this.pathname_next, {})
           .then((res) => {
-            _this.table_list = res.results;
+            _this.table_list = res.results
 
-            _this.pathname_previous = res.previous;
-            _this.pathname_next = res.next;
+            _this.pathname_previous = res.previous
+            _this.pathname_next = res.next
           })
           .catch((err) => {
             _this.$q.notify({
               message: err.detail,
-              icon: "close",
-              color: "negative",
-            });
-          });
+              icon: 'close',
+              color: 'negative'
+            })
+          })
       }
     },
-    reFresh() {
-      var _this = this;
-      _this.getSearchList();
+    reFresh () {
+      var _this = this
+      _this.getSearchList()
     },
 
-    change_status(e) {
-      var _this = this;
+    change_status (e) {
+      var _this = this
       // _this.loading = true
-      _this.detailData(e);
-      _this.confirmForm = true;
-      _this.choose_bill_id = e.billId;
-      _this.choose_bill_code = e.number;
+      _this.detailData(e)
+      _this.confirmForm = true
+      _this.choose_bill_id = e.billId
+      _this.choose_bill_code = e.number
     },
-    confirm_status() {
-      var _this = this;
-      _this.loading = true;
+    confirm_status () {
+      var _this = this
+      _this.loading = true
       const params = {
-        billId: _this.choose_bill_id,
-      };
-      postauth("wms/generateoutbound", params)
+        billId: _this.choose_bill_id
+      }
+      postauth('wms/generateoutbound', params)
         .then((res) => {
           if (res.code == 200) {
             _this.$q.notify({
-              message: "出库库单生成成功,请到出库管理中查看",
-              icon: "check",
-              color: "green",
-            });
+              message: '出库库单生成成功,请到出库管理中查看',
+              icon: 'check',
+              color: 'green'
+            })
           }
           if (res.code == 400) {
             _this.$q.notify({
               message: res.error,
-              icon: "info",
-              color: "info",
-            });
+              icon: 'info',
+              color: 'info'
+            })
           }
         })
         .finally(() => {
-          _this.loading = false;
-          _this.confirmForm = false;
-          _this.getSearchList();
-        });
+          _this.loading = false
+          _this.confirmForm = false
+          _this.getSearchList()
+        })
     },
 
-    detailData(e) {
-      var _this = this;
-      _this.detailForm = true;
-      _this.detailid = e.billId;
-      console.log("detail查询的id是:", _this.detailid);
-      getauth(_this.pathname + _this.detailid + "/")
+    detailData (e) {
+      var _this = this
+      _this.detailForm = true
+      _this.detailid = e.billId
+      console.log('detail查询的id是:', _this.detailid)
+      getauth(_this.pathname + _this.detailid + '/')
         .then((res) => {
-          _this.table_detail = res;
+          _this.table_detail = res
         })
         .catch((err) => {
           _this.$q.notify({
             message: err.detail,
-            icon: "close",
-            color: "negative",
-          });
-        });
-      console.log("detail查询的结果是:", _this.table_detail);
+            icon: 'close',
+            color: 'negative'
+          })
+        })
+      console.log('detail查询的结果是:', _this.table_detail)
 
-      getauth("wms/outmaterials/?bound_billId=" + _this.detailid)
+      getauth('wms/outmaterials/?bound_billId=' + _this.detailid)
         .then((res) => {
-          _this.batch_detail = res.results;
+          _this.batch_detail = res.results
         })
         .catch((err) => {
           _this.$q.notify({
             message: err.detail,
-            icon: "close",
-            color: "negative",
-          });
-        });
-      console.log("batch查询的结果是:", _this.batch_detail);
+            icon: 'close',
+            color: 'negative'
+          })
+        })
+      console.log('batch查询的结果是:', _this.batch_detail)
     },
-    deleteDataSubmit() {
-      var _this = this;
-      deleteauth(_this.pathname + _this.deleteid + "/")
+    deleteDataSubmit () {
+      var _this = this
+      deleteauth(_this.pathname + _this.deleteid + '/')
         .then((res) => {
-          _this.deleteDataCancel();
-          _this.getSearchList();
+          _this.deleteDataCancel()
+          _this.getSearchList()
           _this.$q.notify({
-            message: "成功删除数据",
-            icon: "check",
-            color: "green",
-          });
+            message: '成功删除数据',
+            icon: 'check',
+            color: 'green'
+          })
         })
         .catch((err) => {
           _this.$q.notify({
             message: err.detail,
-            icon: "close",
-            color: "negative",
-          });
-        });
+            icon: 'close',
+            color: 'negative'
+          })
+        })
     },
-    deleteDataCancel() {
-      var _this = this;
-      _this.deleteForm = false;
-      _this.deleteid = 0;
+    deleteDataCancel () {
+      var _this = this
+      _this.deleteForm = false
+      _this.deleteid = 0
     },
 
-    updateProxy() {
-      var _this = this;
-      _this.proxyDate = _this.date;
-    },
+    updateProxy () {
+      var _this = this
+      _this.proxyDate = _this.date
+    }
   },
-  created() {
-    var _this = this;
-    if (LocalStorage.has("openid")) {
-      _this.openid = LocalStorage.getItem("openid");
+  created () {
+    var _this = this
+    if (LocalStorage.has('openid')) {
+      _this.openid = LocalStorage.getItem('openid')
     } else {
-      _this.openid = "";
-      LocalStorage.set("openid", "");
+      _this.openid = ''
+      LocalStorage.set('openid', '')
     }
-    if (LocalStorage.has("warehouse_code")) {
-      _this.warehouse_code = LocalStorage.getItem("warehouse_code");
+    if (LocalStorage.has('warehouse_code')) {
+      _this.warehouse_code = LocalStorage.getItem('warehouse_code')
     }
-    if (LocalStorage.has("warehouse_name")) {
-      _this.warehouse_name = LocalStorage.getItem("warehouse_name");
+    if (LocalStorage.has('warehouse_name')) {
+      _this.warehouse_name = LocalStorage.getItem('warehouse_name')
     }
-    if (LocalStorage.has("login_name")) {
-      _this.login_name = LocalStorage.getItem("login_name");
+    if (LocalStorage.has('login_name')) {
+      _this.login_name = LocalStorage.getItem('login_name')
     } else {
-      _this.login_name = "";
-      LocalStorage.set("login_name", "");
+      _this.login_name = ''
+      LocalStorage.set('login_name', '')
     }
-    if (LocalStorage.has("auth")) {
-      const timeStamp = Date.now();
-      const formattedString = date.formatDate(timeStamp, "YYYY/MM/DD");
-      _this.date = formattedString;
-      console.log(_this.date);
-      _this.authin = "1";
-      _this.getList();
+    if (LocalStorage.has('auth')) {
+      const timeStamp = Date.now()
+      const formattedString = date.formatDate(timeStamp, 'YYYY/MM/DD')
+      _this.date = formattedString
+      console.log(_this.date)
+      _this.authin = '1'
+      _this.getList()
     } else {
-      _this.authin = "0";
+      _this.authin = '0'
     }
-    getauth("warehouse/boundcodetype/", {})
+    getauth('warehouse/boundcodetype/', {})
       .then((res) => {
         _this.bound_code_type_list = res.results.map((item) => ({
           label: item.bound_code_type_name,
-          value: item.bound_code_type_code,
-        }));
+          value: item.bound_code_type_code
+        }))
         // 编码 → 名称的映射(普通对象,确保响应式)
         _this.bound_code_type_map = res.results.reduce((acc, item) => {
-          acc[item.bound_code_type_code] = item.bound_code_type_name;
-          return acc;
-        }, {});
+          acc[item.bound_code_type_code] = item.bound_code_type_name
+          return acc
+        }, {})
       })
       .catch((err) => {
         _this.$q.notify({
           message: err.detail,
-          icon: "close",
-          color: "negative",
-        });
-      });
+          icon: 'close',
+          color: 'negative'
+        })
+      })
 
-    getauth("warehouse/boundtype/", {})
+    getauth('warehouse/boundtype/', {})
       .then((res) => {
         _this.bound_desc_list = res.results.map((item) => ({
           label: item.bound_type_name,
-          value: item.bound_type_code,
-        }));
+          value: item.bound_type_code
+        }))
         // 编码 → 名称的映射(普通对象,确保响应式)
         _this.bound_desc_map = res.results.reduce((acc, item) => {
-          acc[item.bound_type_code] = item.bound_type_name;
-          return acc;
-        }, {});
+          acc[item.bound_type_code] = item.bound_type_name
+          return acc
+        }, {})
       })
       .catch((err) => {
         _this.$q.notify({
           message: err.detail,
-          icon: "close",
-          color: "negative",
-        });
-      });
+          icon: 'close',
+          color: 'negative'
+        })
+      })
 
-    getauth("warehouse/department/", {})
+    getauth('warehouse/department/', {})
       .then((res) => {
         _this.bound_department_list = res.results.map((item) => ({
           label: item.department_name,
-          value: item.department_code,
-        }));
+          value: item.department_code
+        }))
         _this.bound_department_map = res.results.reduce((acc, item) => {
-          acc[item.department_code] = item.department_name;
-          return acc;
-        }, {});
+          acc[item.department_code] = item.department_name
+          return acc
+        }, {})
       })
       .catch((err) => {
         _this.$q.notify({
           message: err.detail,
-          icon: "close",
-          color: "negative",
-        });
-      });
+          icon: 'close',
+          color: 'negative'
+        })
+      })
 
-    getauth("warehouse/boundbusiness/", {})
+    getauth('warehouse/boundbusiness/', {})
       .then((res) => {
         _this.bound_bs_type_list = res.results.map((item) => ({
           label: item.bound_bs_name,
-          value: item.bound_bs_code,
-        }));
+          value: item.bound_bs_code
+        }))
         // 编码 → 名称的映射(普通对象,确保响应式)
         _this.bound_bs_type_map = res.results.reduce((acc, item) => {
-          acc[item.bound_bs_code] = item.bound_bs_name;
-          return acc;
-        }, {});
+          acc[item.bound_bs_code] = item.bound_bs_name
+          return acc
+        }, {})
       })
       .catch((err) => {
         _this.$q.notify({
           message: err.detail,
-          icon: "close",
-          color: "negative",
-        });
-      });
+          icon: 'close',
+          color: 'negative'
+        })
+      })
   },
 
-  mounted() {
-    var _this = this;
+  mounted () {
+    var _this = this
     if (_this.$q.platform.is.electron) {
-      _this.height = String(_this.$q.screen.height - 290) + "px";
+      _this.height = String(_this.$q.screen.height - 290) + 'px'
     } else {
-      _this.height = _this.$q.screen.height - 290 + "" + "px";
+      _this.height = _this.$q.screen.height - 290 + '' + 'px'
     }
-    _this.newFormData.creater = _this.login_name;
+    _this.newFormData.creater = _this.login_name
   },
-  updated() {},
-  destroyed() {},
-};
+  updated () {},
+  destroyed () {}
+}
 </script>
 <style scoped>
 /* 添加在 <style> 中 */

+ 172 - 172
templates/src/pages/erp/erpsortstock.vue

@@ -221,300 +221,300 @@
 <router-view />
 
 <script>
-import { getauth, postauth, putauth, deleteauth } from "boot/axios_request";
-import { date, exportFile, LocalStorage } from "quasar";
+import { getauth, postauth, putauth, deleteauth } from 'boot/axios_request'
+import { date, exportFile, LocalStorage } from 'quasar'
 
 export default {
-  name: "PageTask",
-  data() {
+  name: 'PageTask',
+  data () {
     return {
-      createDate1: "",
-      createDate2: "",
-      date_range: "",
-      proxyDate: "",
-      date: "",
-      goods_code: "",
-      goods_desc: "",
-      openid: "",
-      login_name: "",
-      authin: "0",
-      searchUrl: "",
-      pathname: "container/task/",
-      pathname_previous: "",
-      pathname_next: "",
-      separator: "cell",
+      createDate1: '',
+      createDate2: '',
+      date_range: '',
+      proxyDate: '',
+      date: '',
+      goods_code: '',
+      goods_desc: '',
+      openid: '',
+      login_name: '',
+      authin: '0',
+      searchUrl: '',
+      pathname: 'container/task/',
+      pathname_previous: '',
+      pathname_next: '',
+      separator: 'cell',
       loading: false,
-      height: "",
+      height: '',
       viewForm: false,
       table_list: [],
       columns: [
         {
-          name: "document_date",
+          name: 'document_date',
           required: true,
-          label: "入库时间",
-          align: "center",
-          field: "document_date",
+          label: '入库时间',
+          align: 'center',
+          field: 'document_date'
         },
         {
-          name: "document_number",
-          label: "单据编号",
-          field: "document_number",
-          align: "center",
+          name: 'document_number',
+          label: '单据编号',
+          field: 'document_number',
+          align: 'center'
         },
         {
-          name: "department",
-          label: "部门",
-          field: "department",
-          align: "center",
+          name: 'department',
+          label: '部门',
+          field: 'department',
+          align: 'center'
         },
 
         {
-          name: "goods_code",
-          label: "存货编码",
-          field: "goods_code",
-          align: "center",
+          name: 'goods_code',
+          label: '存货编码',
+          field: 'goods_code',
+          align: 'center'
         },
         {
-          name: "goods_desc",
-          label: "存货",
-          field: "goods_desc",
-          align: "center",
+          name: 'goods_desc',
+          label: '存货',
+          field: 'goods_desc',
+          align: 'center'
         },
         {
-          name: "goods_std",
-          label: "规格型号",
-          field: "goods_std",
-          align: "center",
+          name: 'goods_std',
+          label: '规格型号',
+          field: 'goods_std',
+          align: 'center'
         },
         {
-          name: "goods_batch",
-          label: "入库批号",
-          field: "goods_batch",
-          align: "center",
+          name: 'goods_batch',
+          label: '入库批号',
+          field: 'goods_batch',
+          align: 'center'
         },
 
         {
-          name: "goods_in",
-          label: "入库数目",
-          field: "goods_in",
-          align: "center",
+          name: 'goods_in',
+          label: '入库数目',
+          field: 'goods_in',
+          align: 'center'
         },
         {
-          name: "container_number",
-          label: "托盘编码",
-          field: "container_number",
-          align: "center",
+          name: 'container_number',
+          label: '托盘编码',
+          field: 'container_number',
+          align: 'center'
         },
 
         // { name: 'goods_notes', label: '备注', field: 'goods_notes', align: 'center' },
-        { name: "creator", label: "创建人", field: "creator", align: "center" },
+        { name: 'creator', label: '创建人', field: 'creator', align: 'center' }
       ],
-      filter: "",
+      filter: '',
       pagination: {
         page: 1,
-        rowsPerPage: 11,
+        rowsPerPage: 11
       },
       current: 1,
       max: 0,
       total: 0,
       paginationIpt: 1,
-      current: 1,
-    };
+      current: 1
+    }
   },
   computed: {
-    interval() {
+    interval () {
       return (
-        this.$t("download_center.start") +
-        " - " +
-        this.$t("download_center.end")
-      );
-    },
+        this.$t('download_center.start') +
+        ' - ' +
+        this.$t('download_center.end')
+      )
+    }
   },
   methods: {
-    getList(params = {}) {
-      var _this = this;
-      _this.loading = true;
+    getList (params = {}) {
+      var _this = this
+      _this.loading = true
       // 合并基础参数
       const baseParams = {
         page: _this.current,
-        page_size: _this.pagination.rowsPerPage,
-      };
+        page_size: _this.pagination.rowsPerPage
+      }
 
       // 创建URLSearchParams处理参数
       const queryParams = new URLSearchParams({
         ...baseParams,
-        ...params,
-      });
-      console.log(queryParams);
+        ...params
+      })
+      console.log(queryParams)
       // 过滤空值参数
       Array.from(queryParams.entries()).forEach(([key, value]) => {
-        if (value === "" || value === null || value === undefined) {
-          queryParams.delete(key);
+        if (value === '' || value === null || value === undefined) {
+          queryParams.delete(key)
         }
-      });
+      })
 
       getauth(`${_this.pathname}?${queryParams}`)
         .then((res) => {
-          _this.table_list = res.results;
-          _this.total = res.count;
-          _this.max = Math.ceil(res.count / _this.pagination.rowsPerPage) || 0;
-          _this.pathname_previous = res.previous;
-          _this.pathname_next = res.next;
+          _this.table_list = res.results
+          _this.total = res.count
+          _this.max = Math.ceil(res.count / _this.pagination.rowsPerPage) || 0
+          _this.pathname_previous = res.previous
+          _this.pathname_next = res.next
         })
         .catch((err) => {
           _this.$q.notify({
             message: err.detail,
-            icon: "close",
-            color: "negative",
-          });
+            icon: 'close',
+            color: 'negative'
+          })
         })
         .finally(() => {
-          _this.loading = false;
-        });
+          _this.loading = false
+        })
     },
-    changePageEnter() {
+    changePageEnter () {
       if (Number(this.paginationIpt) < 1) {
-        this.current = 1;
-        this.paginationIpt = 1;
+        this.current = 1
+        this.paginationIpt = 1
       } else if (Number(this.paginationIpt) > this.max) {
-        this.current = this.max;
-        this.paginationIpt = this.max;
+        this.current = this.max
+        this.paginationIpt = this.max
       } else {
-        this.current = Number(this.paginationIpt);
+        this.current = Number(this.paginationIpt)
       }
-      this.getSearchList(this.current);
+      this.getSearchList(this.current)
     },
 
     // 带搜索条件加载
-    getSearchList(page = 1) {
-      this.current = page;
-      this.paginationIpt = page;
+    getSearchList (page = 1) {
+      this.current = page
+      this.paginationIpt = page
       this.getList({
         container_detail__goods_desc__icontains: this.filter,
-        create_time__range: this.date_range,
-      });
+        create_time__range: this.date_range
+      })
     },
 
-    getListPrevious() {
-      var _this = this;
-      if (LocalStorage.has("auth")) {
+    getListPrevious () {
+      var _this = this
+      if (LocalStorage.has('auth')) {
         getauth(_this.pathname_previous, {})
           .then((res) => {
-            _this.table_list = res.results;
-            _this.pathname_previous = res.previous;
-            _this.pathname_next = res.next;
+            _this.table_list = res.results
+            _this.pathname_previous = res.previous
+            _this.pathname_next = res.next
           })
           .catch((err) => {
             _this.$q.notify({
               message: err.detail,
-              icon: "close",
-              color: "negative",
-            });
-          });
+              icon: 'close',
+              color: 'negative'
+            })
+          })
       } else {
       }
     },
-    getListNext() {
-      var _this = this;
-      if (LocalStorage.has("auth")) {
+    getListNext () {
+      var _this = this
+      if (LocalStorage.has('auth')) {
         getauth(_this.pathname_next, {})
           .then((res) => {
-            _this.table_list = res.results;
+            _this.table_list = res.results
 
-            _this.pathname_previous = res.previous;
-            _this.pathname_next = res.next;
+            _this.pathname_previous = res.previous
+            _this.pathname_next = res.next
           })
           .catch((err) => {
             _this.$q.notify({
               message: err.detail,
-              icon: "close",
-              color: "negative",
-            });
-          });
+              icon: 'close',
+              color: 'negative'
+            })
+          })
       }
     },
-    reFresh() {
-      var _this = this;
-      _this.getSearchList();
+    reFresh () {
+      var _this = this
+      _this.getSearchList()
     },
 
-    updateProxy() {
-      var _this = this;
-      _this.proxyDate = _this.date;
-    },
+    updateProxy () {
+      var _this = this
+      _this.proxyDate = _this.date
+    }
   },
-  created() {
-    var _this = this;
-    if (LocalStorage.has("openid")) {
-      _this.openid = LocalStorage.getItem("openid");
+  created () {
+    var _this = this
+    if (LocalStorage.has('openid')) {
+      _this.openid = LocalStorage.getItem('openid')
     } else {
-      _this.openid = "";
-      LocalStorage.set("openid", "");
+      _this.openid = ''
+      LocalStorage.set('openid', '')
     }
-    if (LocalStorage.has("login_name")) {
-      _this.login_name = LocalStorage.getItem("login_name");
+    if (LocalStorage.has('login_name')) {
+      _this.login_name = LocalStorage.getItem('login_name')
     } else {
-      _this.login_name = "";
-      LocalStorage.set("login_name", "");
+      _this.login_name = ''
+      LocalStorage.set('login_name', '')
     }
-    if (LocalStorage.has("auth")) {
-      const timeStamp = Date.now();
-      const formattedString = date.formatDate(timeStamp, "YYYY/MM/DD");
-      _this.date = formattedString;
-      console.log(_this.date);
-      _this.authin = "1";
-      _this.getList();
+    if (LocalStorage.has('auth')) {
+      const timeStamp = Date.now()
+      const formattedString = date.formatDate(timeStamp, 'YYYY/MM/DD')
+      _this.date = formattedString
+      console.log(_this.date)
+      _this.authin = '1'
+      _this.getList()
     } else {
-      _this.authin = "0";
+      _this.authin = '0'
     }
   },
-  mounted() {
-    var _this = this;
+  mounted () {
+    var _this = this
     if (_this.$q.platform.is.electron) {
-      _this.height = String(_this.$q.screen.height - 290) + "px";
+      _this.height = String(_this.$q.screen.height - 290) + 'px'
     } else {
-      _this.height = _this.$q.screen.height - 290 + "" + "px";
+      _this.height = _this.$q.screen.height - 290 + '' + 'px'
     }
   },
-  updated() {},
-  destroyed() {},
+  updated () {},
+  destroyed () {},
   // 在 watch 或方法中添加调试代码
   watch: {
-    createDate1(val) {
+    createDate1 (val) {
       if (val) {
         if (val.to) {
-          this.createDate2 = `${val.from} - ${val.to}`;
-          this.date_range = `${val.from},${val.to} `;
+          this.createDate2 = `${val.from} - ${val.to}`
+          this.date_range = `${val.from},${val.to} `
 
           // this.downloadhUrl = this.pathname + 'filelist/?' + 'document_date__range=' + this.date_range
         } else {
-          this.createDate2 = `${val}`;
-          this.dateArray = val.split("/");
+          this.createDate2 = `${val}`
+          this.dateArray = val.split('/')
           this.searchUrl =
             this.pathname +
-            "?" +
-            "document_date__year=" +
+            '?' +
+            'document_date__year=' +
             this.dateArray[0] +
-            "&" +
-            "document_date__month=" +
+            '&' +
+            'document_date__month=' +
             this.dateArray[1] +
-            "&" +
-            "document_date__day=" +
-            this.dateArray[2];
+            '&' +
+            'document_date__day=' +
+            this.dateArray[2]
           // this.downloadhUrl = this.pathname + 'filelist/?' + 'document_date__year=' + this.dateArray[0] + '&' + 'document_date__month=' + this.dateArray[1] + '&' + 'document_date__day=' + this.dateArray[2]
         }
-        this.date_range = this.date_range.replace(/\//g, "-");
+        this.date_range = this.date_range.replace(/\//g, '-')
 
-        this.getSearchList();
-        this.$refs.qDateProxy.hide();
+        this.getSearchList()
+        this.$refs.qDateProxy.hide()
       } else {
-        this.createDate2 = "";
-        this.date_range = "";
-        this.getSearchList();
+        this.createDate2 = ''
+        this.date_range = ''
+        this.getSearchList()
       }
-    },
-  },
-};
+    }
+  }
+}
 </script>
 <style scoped>
 /* 添加在 <style> 中 */

ファイルの差分が大きいため隠しています
+ 448 - 449
templates/src/pages/inbound/asn.vue