Quellcode durchsuchen

完善erp,编写前端按钮

flower_mr vor 4 Wochen
Ursprung
Commit
f9cf5d9b84
35 geänderte Dateien mit 9413 neuen und 3268 gelöschten Zeilen
  1. 22 0
      .vscode/launch.json
  2. 1 1
      backend_start windows.ps1
  3. BIN
      bound/__pycache__/models.cpython-38.pyc
  4. 17 0
      bound/migrations/0009_alter_boundlistmodel_options.py
  5. 18 0
      bound/migrations/0010_alter_boundlistmodel_bound_status.py
  6. 18 0
      bound/migrations/0011_boundlistmodel_audit_status.py
  7. BIN
      bound/migrations/__pycache__/0009_alter_boundlistmodel_options.cpython-38.pyc
  8. BIN
      bound/migrations/__pycache__/0010_alter_boundlistmodel_bound_status.cpython-38.pyc
  9. BIN
      bound/migrations/__pycache__/0011_boundlistmodel_audit_status.cpython-38.pyc
  10. 10 3
      bound/models.py
  11. BIN
      container/__pycache__/views.cpython-38.pyc
  12. 3 1
      container/views.py
  13. 33 0
      data_base/generate_base.py
  14. 23 20
      data_base/test_erp.py
  15. BIN
      db.sqlite3
  16. BIN
      erp/__pycache__/urls.cpython-38.pyc
  17. BIN
      erp/__pycache__/views.cpython-38.pyc
  18. 12 9
      erp/views.py
  19. BIN
      greaterwms/__pycache__/wsgi.cpython-38.pyc
  20. 12 0
      logs/boundBill.log
  21. 3712 0
      logs/server.log
  22. 685 376
      templates/src/layouts/MainLayout.vue
  23. 799 650
      templates/src/pages/container/containerlist.vue
  24. 43 36
      templates/src/pages/erp/erp.vue
  25. 772 526
      templates/src/pages/erp/erpasn.vue
  26. 988 0
      templates/src/pages/erp/erpasnaudit.vue
  27. 654 524
      templates/src/pages/erp/erpdn.vue
  28. 368 233
      templates/src/pages/erp/erpsortstock.vue
  29. 1138 755
      templates/src/pages/inbound/asn.vue
  30. 39 134
      templates/src/pages/warehouse/warehouseset.vue
  31. 5 0
      templates/src/router/routes.js
  32. BIN
      warehouse/__pycache__/models.cpython-38.pyc
  33. 28 0
      warehouse/migrations/0005_baseset.py
  34. BIN
      warehouse/migrations/__pycache__/0005_baseset.cpython-38.pyc
  35. 13 0
      warehouse/models.py

+ 22 - 0
.vscode/launch.json

@@ -0,0 +1,22 @@
+{
+  "version": "0.2.0",
+  "configurations": [
+
+    {
+      "name": "Python: Django",
+      "type": "python",
+      "request": "launch",
+      "program": "${workspaceFolder}/manage.py",
+      "args": [
+        "runserver",
+        "0.0.0.0:8008", // 指定IP和端口[1,3](@ref)
+        "--noreload" // 禁用自动重载(调试必需)
+      ],
+      "django": true,
+      "pythonPath": "${workspaceFolder}/.venv/Scripts/python.exe",
+      "env": {
+        "PYTHONPATH": "${workspaceFolder}"
+      }
+    }
+  ]
+}

+ 1 - 1
backend_start windows.ps1

@@ -2,4 +2,4 @@
 python manage.py makemigrations
 python manage.py migrate
 
-daphne -b 0.0.0.0 -p 8008 greaterwms.asgi:application
+# daphne -b 0.0.0.0 -p 8008 greaterwms.asgi:application

BIN
bound/__pycache__/models.cpython-38.pyc


+ 17 - 0
bound/migrations/0009_alter_boundlistmodel_options.py

@@ -0,0 +1,17 @@
+# Generated by Django 4.1.2 on 2025-05-08 22:10
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('bound', '0008_alter_boundbatchmodel_goods_std_and_more'),
+    ]
+
+    operations = [
+        migrations.AlterModelOptions(
+            name='boundlistmodel',
+            options={'ordering': ['bound_status', '-id'], 'verbose_name': 'Bound List', 'verbose_name_plural': 'Bound List'},
+        ),
+    ]

+ 18 - 0
bound/migrations/0010_alter_boundlistmodel_bound_status.py

@@ -0,0 +1,18 @@
+# Generated by Django 4.1.2 on 2025-05-08 22:16
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('bound', '0009_alter_boundlistmodel_options'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='boundlistmodel',
+            name='bound_status',
+            field=models.CharField(choices=[('100', '入库申请'), ('101', '入库同意'), ('102', '组盘中'), ('103', '部分入库'), ('104', '已入库'), ('111', '质检合格'), ('200', '出库申请'), ('201', '出库同意'), ('202', '出库中'), ('203', '部分出库'), ('204', '已出库'), ('300', '完成')], default='100', max_length=255, verbose_name='单据状态'),
+        ),
+    ]

+ 18 - 0
bound/migrations/0011_boundlistmodel_audit_status.py

@@ -0,0 +1,18 @@
+# Generated by Django 4.1.2 on 2025-05-08 22:19
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('bound', '0010_alter_boundlistmodel_bound_status'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='boundlistmodel',
+            name='audit_status',
+            field=models.BooleanField(default=False, verbose_name='审核状态'),
+        ),
+    ]

BIN
bound/migrations/__pycache__/0009_alter_boundlistmodel_options.cpython-38.pyc


BIN
bound/migrations/__pycache__/0010_alter_boundlistmodel_bound_status.cpython-38.pyc


BIN
bound/migrations/__pycache__/0011_boundlistmodel_audit_status.cpython-38.pyc


+ 10 - 3
bound/models.py

@@ -3,7 +3,14 @@ from erp.models import InboundBill, MaterialDetail, OutboundBill,OutMaterialDeta
 
 
 class BoundListModel(models.Model):
-    STATUS = ("100", '入库申请'), ("101", '入库同意'), ("102", '组盘中'), ("200", '出库申请'), ("201", '出库同意'), ("202", '出库中'), ("203", '部分出库'), ("204", '已出库'), ("300", '完成')
+    STATUS =( 
+            ("100", '入库申请'), ("101", '入库同意'), ("102", '组盘中'), ("103", '部分入库'), ("104", '已入库'),
+            ("111", '质检合格'),
+            ("200", '出库申请'), ("201", '出库同意'), ("202", '出库中'), ("203", '部分出库'), ("204", '已出库'), 
+            ("300", '完成')
+            )
+    
+    audit_status = models.BooleanField(default=False, verbose_name='审核状态')
 
     bound_month = models.CharField(max_length=255, verbose_name="月份")
     bound_date = models.DateField(verbose_name="单据日期")
@@ -17,7 +24,7 @@ class BoundListModel(models.Model):
 
     base_type = models.IntegerField(default=0, verbose_name="基准类型")
 
-    bound_status = models.CharField(max_length=255, verbose_name="单据状态")
+    bound_status = models.CharField(max_length=255, verbose_name="单据状态",choices=STATUS, default='100')
     note = models.CharField(default='', max_length=255, verbose_name="备注")
 
     creater = models.CharField(default='uesr', max_length=255, verbose_name="Who Created")
@@ -32,7 +39,7 @@ class BoundListModel(models.Model):
         db_table = 'boundlist'
         verbose_name = 'Bound List'
         verbose_name_plural = "Bound List"
-        ordering = ['-id']
+        ordering = ['bound_status','-id']
 
 class BoundBatchModel(models.Model):
 

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


+ 3 - 1
container/views.py

@@ -1,3 +1,5 @@
+from wsgiref import headers
+
 from rest_framework import viewsets
 from utils.page import MyPageNumberPagination
 
@@ -61,7 +63,7 @@ class ContainerListViewSet(viewsets.ModelViewSet):
             if id is None:
                 return ContainerListModel.objects.filter()
             else:
-                return ContainerListModel.objects.filter( id=id)
+                return ContainerListModel.objects.filter(id=id)
         else:
             return ContainerListModel.objects.none()
 

+ 33 - 0
data_base/generate_base.py

@@ -0,0 +1,33 @@
+# generate_locations.py
+import os
+import django
+import sys
+
+
+def setup_django():
+    # 使用原始字符串处理Windows路径
+    project_path = "D:/Document/code/vue/greater_wms"
+    sys.path.append(project_path)
+    
+    # 根据实际目录名设置(注意下划线)
+    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'greaterwms.settings')
+    django.setup()
+
+def main():
+    try:
+
+        from warehouse.models import baseset
+
+        baseset.objects.create(set_name="x-acgw-identity", set_value="jF8MTk2M2QzMWEzMjUwMTZlMzA3MDF8NDg5ODM4MzM4NjE3OHwYjYJyvo-DbkhOliEpFtiFOsCgKKo6braaiQGE9qdNx3w=", set_desc="请求头认证")
+
+
+
+        print("✅ 方法生成成功!")
+    except Exception as e:
+        print(f"❌ 生成失败:{str(e)}")
+        import traceback
+        traceback.print_exc()
+
+if __name__ == "__main__":
+    setup_django()
+    main()

+ 23 - 20
data_base/test_erp.py

@@ -18,13 +18,15 @@ def main():
         # 从正确的应用导入模型
         from erp.views import AccessToken ,ProductionInboundAuditSync,PurchaseInboundAuditSync,OtherInboundAuditSync,OtherOutboundAuditSync,ProductionOutboundAuditSync,PurchaseInboundSaveSync,SaleOutboundSaveSync
         from erp.models import InboundBill
+        from warehouse.models import baseset
+   
         
         token = AccessToken.get_current_token()
         print('【1】token:',token)
 
        
 
-        # 所有同步操作统一入口
+        # 所有审核操作统一入口
         # inbound_bill = InboundBill.objects.filter(billId=2210144887247006720).first()
         inbound_bill = InboundBill.objects.filter(billId=2210170242427054080).first()
         print(f"ERP单号: {inbound_bill.number}")
@@ -32,35 +34,36 @@ def main():
             print("❌ 未找到ERP单据")
             return
 
-        # ProductionInboundAuditsync = ProductionInboundAuditSync(inbound_bill)
+        # ProductionInboundAuditsync = ProductionInboundAuditSync(inbound_bill,[])
+        # success = ProductionInboundAuditsync.execute_sync()
         
-        PurchaseInboundAuditsync = PurchaseInboundAuditSync(inbound_bill)
-        # OtherInboundAuditsync = OtherInboundAuditSync(inbound_bill)
-        # OtherOutboundAuditsync = OtherOutboundAuditSync(inbound_bill)
-        # ProductionOutboundAuditsync = ProductionOutboundAuditSync(inbound_bill)
-        # PurchaseInboundSavesync = PurchaseInboundSaveSync(inbound_bill)
-        # SaleOutboundSavesync = SaleOutboundSaveSync(inbound_bill)
 
-        # success = ProductionInboundAuditsync.execute_sync()
-        # 同步采购入库单
+        # 审核采购入库单
+        PurchaseInboundAuditsync = PurchaseInboundAuditSync(inbound_bill,[])
         success = PurchaseInboundAuditsync.execute_sync()
-        # success = PurchaseInboundAuditsync.execute_sync()
-        # # 同步其它入库单
+
+
+        # # 审核其它入库单
+        # OtherInboundAuditsync = OtherInboundAuditSync(inbound_bill,[])
         # success = OtherInboundAuditsync.execute_sync()
-        # # 同步其它出库单
+       
+        # # 审核其它出库单
+        # OtherOutboundAuditsync = OtherOutboundAuditSync(inbound_bill,[])
         # success = OtherOutboundAuditsync.execute_sync()
-        # # 同步生产出库单
+
+        # # 审核生产出库单
+        # ProductionOutboundAuditsync = ProductionOutboundAuditSync(inbound_bill,[])
         # success = ProductionOutboundAuditsync.execute_sync()
-        # # 同步采购入库单保存
+        
+        # # 保存采购入库单
+        # PurchaseInboundSavesync = PurchaseInboundSaveSync(inbound_bill,[])
         # success = PurchaseInboundSavesync.execute_sync()
-        # # 同步销售出库单保存
+        
+        # # 保存销售出库单
+        # SaleOutboundSavesync = SaleOutboundSaveSync(inbound_bill,[])
         # success = SaleOutboundSavesync.execute_sync()
 
 
-        # # 通过模型字段直接访问ERP ID
-        # print(f"ERP审核单号: {inbound_bill.erp_audit_id}")
-        # print(f"ERP采购单号: {inbound_bill.erp_save_id}")
-
         print("✅ 方法生成成功!")
     except Exception as e:
         print(f"❌ 生成失败:{str(e)}")

BIN
db.sqlite3


BIN
erp/__pycache__/urls.cpython-38.pyc


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


+ 12 - 9
erp/views.py

@@ -1140,8 +1140,9 @@ class ERPSyncBase:
     retry_delay = 3
       # 重试间隔秒数
     
-    def __init__(self, wms_bill):
+    def __init__(self, wms_bill,entryIds):
         self.wms_bill = wms_bill  # WMS单据对象
+        self.entryIds = entryIds  # 物料明细ID数组
         self.erp_id_field = None  # 需要更新的ERP ID字段名
         
     def build_erp_payload(self):
@@ -1164,7 +1165,7 @@ class ERPSyncBase:
             'accessToken': f'{AccessToken.get_current_token()}',
             'x-acgw-identity': 'djF8MTk2M2QzMWEzMjUwMTZlMzA3MDF8NDg5ODM4MzM4NjE3OHwYjYJyvo-DbkhOliEpFtiFOsCgKKo6braaiQGE9qdNx3w='
         }
-        
+
         for attempt in range(self.max_retries):
             try:
                 print("请求头:",headers)
@@ -1322,7 +1323,7 @@ class TransferInboundAuditSync(ERPSyncBase):
         if response['status'] != True:
             raise ValueError(f"ERP审核失败: {response['message']}")
         return response['data']
-"""其他出库审核同步"""
+"""其他出库审核"""
 class OtherOutboundAuditSync(ERPSyncBase):
     
     erp_id_field = 'erp_audit_id'
@@ -1384,6 +1385,8 @@ class ProductionOutboundAuditSync(ERPSyncBase):
         if response['status'] != True:
             raise ValueError(f"ERP审核失败: {response['message']}")
         return response['data']
+
+
 """采购入库保存"""
 class PurchaseInboundSaveSync(ERPSyncBase):
    
@@ -1405,9 +1408,9 @@ class PurchaseInboundSaveSync(ERPSyncBase):
         return {
             "purinbill": {
                 "billId":self.wms_bill.erp_audit_id,
-                "entryIds": [
-                    self.wms_bill.number,
-                ]
+                "entryIds": 
+                    self.entryIds,
+                
             }
         }
                  
@@ -1435,9 +1438,9 @@ class SaleOutboundSaveSync(ERPSyncBase):
         return {
             "purinbill": {
                 "billId":self.wms_bill.erp_audit_id,
-                "entryIds": [
-                    self.wms_bill.number,
-                ]
+                "entryIds": 
+                    self.entryIds,
+                
             }
         }
                  

BIN
greaterwms/__pycache__/wsgi.cpython-38.pyc


+ 12 - 0
logs/boundBill.log

@@ -479,3 +479,15 @@ AttributeError: 'NoneType' object has no attribute 'entryIds'
 [2025-05-08 11:07:28,137][wms.boundBill.validate_and_lock():544] [INFO] 原始单据状态: 0
 [2025-05-08 11:07:28,149][wms.boundBill.post():502] [INFO] 创建出入库主单成功 | bound_code: QTCK-250508-000001
 [2025-05-08 11:07:28,170][wms.boundBill.post():510] [INFO] 出库单生成成功 | billId: 2210176946912903168 -> boundCode: QTCK-250508-000001
+[2025-05-08 21:16:18,910][wms.boundBill.get_token():1114] [INFO] 获取access_token成功 | access_token: OPENAPIAUTH_MjE1NDcxOTUxMDEwNjQ3NDQ5Nl84WUpNV0dQSUY2ZHNQUUlDaFFzenFQdXhOQlF6UkF2MWV6ZHY4UzVkS3NOeVI1bmY5UVV5bFBsSER4ZTZnZUVwNk9pTnhCa0g5M1cydjJHdDRqbGhLemMyRFlQa0Y0NE9Od1FhMTM=
+[2025-05-08 21:16:43,118][wms.boundBill.get_token():1114] [INFO] 获取access_token成功 | access_token: OPENAPIAUTH_MjE1NDcxOTUxMDEwNjQ3NDQ5Nl9qY0piaXNWcjRkNm5OZEZqUVh1aHJLR1VTNUxsS1A0MTVZSHd0SWltVTZGYUtraWZBYUlpSGJHRmJTMUtOOTJuMVgxUDY3TGF4Zm1NdmZKVTl3WWhRMENsbHhGaDU3NlltTjJlMTM=
+[2025-05-08 21:44:04,478][wms.boundBill.validate_and_lock():541] [INFO] 锁定原始单据成功 | billId: 2194926863518846976
+[2025-05-08 21:44:04,478][wms.boundBill.validate_and_lock():542] [INFO] 原始单据状态: 0
+[2025-05-08 21:44:04,484][wms.boundBill.post():500] [INFO] 创建出入库主单成功 | bound_code: QTCK-250417-000001
+[2025-05-08 21:44:04,488][wms.boundBill.post():527] [ERROR] 出库单生成异常 | billId: 2194926863518846976
+Traceback (most recent call last):
+  File "D:\Document\code\vue\greater_wms\erp\views.py", line 502, in post
+    self.process_materials(bill_obj, bound_list)
+  File "D:\Document\code\vue\greater_wms\erp\views.py", line 577, in process_materials
+    MaterialDetail_obj = MaterialDetail.objects.get(entryIds=material.Material_entryIds.entryIds)
+AttributeError: 'NoneType' object has no attribute 'entryIds'

Datei-Diff unterdrückt, da er zu groß ist
+ 3712 - 0
logs/server.log


Datei-Diff unterdrückt, da er zu groß ist
+ 685 - 376
templates/src/layouts/MainLayout.vue


Datei-Diff unterdrückt, da er zu groß ist
+ 799 - 650
templates/src/pages/container/containerlist.vue


+ 43 - 36
templates/src/pages/erp/erp.vue

@@ -1,30 +1,38 @@
 <template>
   <q-page class="flex flex-top">
-<template>
-  <div class="q-pa-md">
-    <div class="q-gutter-y-md" style="max-width: 100%">
-      <q-tabs
-        v-model="detaillink"
-      >
-        <transition appear enter-active-class="animated zoomIn">
-          <q-route-tab name="asn" :label="$t('inbound.asn')" icon="img:statics/inbound/asn.png" :to="{ name: 'erpasn' }" exact/>
-        </transition>
-        <!-- <transition appear enter-active-class="animated zoomIn">
-          <q-route-tab name="predeliverystock" :label="$t('inbound.predeliverystock')"  icon="img:statics/inbound/polist.png" :to="{ name: 'predeliverystock' }" exact/>
-        </transition>
-        <transition appear enter-active-class="animated zoomIn">
-          <q-route-tab name="preloadstock" :label="$t('inbound.preloadstock')" icon="img:statics/inbound/preloadstock.png" :to="{ name: 'preloadstock' }" exact/>
-        </transition>
-        <transition appear enter-active-class="animated zoomIn">
-          <q-route-tab name="presortstock" :label="$t('inbound.presortstock')" icon="img:statics/inbound/presortstock.png" :to="{ name: 'presortstock' }" exact/>
-        </transition> -->
-        <transition appear enter-active-class="animated zoomIn">
-          <q-route-tab name="erpdn" :label="'出库申请书'" icon="img:statics/inbound/sortstock.png" :to="{ name: 'erpdn' }" exact/>
-        </transition>
-        <transition appear enter-active-class="animated zoomIn">
-          <q-route-tab name="sortstock" :label="$t('inbound.sortstock')" icon="img:statics/inbound/sortstock.png" :to="{ name: 'erpsortstock' }" exact/>
-        </transition>
-        <!-- <transition appear enter-active-class="animated zoomIn">
+    <template>
+      <div class="q-pa-md">
+        <div class="q-gutter-y-md" style="max-width: 100%">
+          <q-tabs v-model="detaillink">
+            <transition appear enter-active-class="animated zoomIn">
+              <q-route-tab
+                name="asn"
+                :label="'入库汇报单'"
+                icon="img:statics/inbound/asn.png"
+                :to="{ name: 'erpasn' }"
+                exact
+              />
+            </transition>
+
+            <transition appear enter-active-class="animated zoomIn">
+              <q-route-tab
+                name="erpdn"
+                :label="'出库汇报单'"
+                icon="img:statics/inbound/sortstock.png"
+                :to="{ name: 'erpdn' }"
+                exact
+              />
+            </transition>
+            <transition appear enter-active-class="animated zoomIn">
+              <q-route-tab
+                name="sortstock"
+                :label="$t('inbound.sortstock')"
+                icon="img:statics/inbound/sortstock.png"
+                :to="{ name: 'erpsortstock' }"
+                exact
+              />
+            </transition>
+            <!-- <transition appear enter-active-class="animated zoomIn">
           <q-route-tab name="shortage" :label="$t('inbound.shortage')" icon="img:statics/inbound/shortage.png" :to="{ name: 'shortage' }" exact/>
         </transition>
         <transition appear enter-active-class="animated zoomIn">
@@ -33,10 +41,10 @@
         <transition appear enter-active-class="animated zoomIn">
           <q-route-tab name="asnfinish" :label="$t('inbound.asnfinish')" icon="img:statics/inbound/asnfinish.png" :to="{ name: 'asnfinish' }" exact/>
         </transition> -->
-      </q-tabs>
-    </div>
-  </div>
-</template>
+          </q-tabs>
+        </div>
+      </div>
+    </template>
     <div class="main-table">
       <router-view />
     </div>
@@ -45,13 +53,12 @@
 
 <script>
 export default {
-  name: 'Pageinbound',
-  data () {
+  name: "Pageinbound",
+  data() {
     return {
-      detaillink: 'asn'
-    }
+      detaillink: "asn",
+    };
   },
-  methods: {
-  }
-}
+  methods: {},
+};
 </script>

Datei-Diff unterdrückt, da er zu groß ist
+ 772 - 526
templates/src/pages/erp/erpasn.vue


+ 988 - 0
templates/src/pages/erp/erpasnaudit.vue

@@ -0,0 +1,988 @@
+<template>
+  <div>
+    <transition appear enter-active-class="animated fadeIn">
+      <q-table
+        class="my-sticky-header-column-table shadow-24"
+        :data="table_list"
+        row-key="id"
+        :separator="separator"
+        :loading="loading"
+        :columns="columns"
+        hide-bottom
+        :pagination.sync="pagination"
+        no-data-label="No data"
+        no-results-label="No data you want"
+        :table-style="{ height: height }"
+        flat
+        bordered
+      >
+        <template v-slot:top>
+          <q-btn-group push>
+            <q-btn :label="$t('refresh')" icon="refresh" @click="reFresh()">
+              <q-tooltip
+                content-class="bg-amber text-black shadow-4"
+                :offset="[10, 10]"
+                content-style="font-size: 12px"
+                >{{ $t("refreshtip") }}</q-tooltip
+              >
+            </q-btn>
+          </q-btn-group>
+          <q-space />
+          <div class="flex items-center">
+            <q-input
+              outlined
+              rounded
+              dense
+              debounce="200"
+              color="primary"
+              v-model="filter"
+              :placeholder="'输入单据编号搜索'"
+              @input="getSearchList()"
+              @keyup.enter="getSearchList()"
+            >
+              <template v-slot:append>
+                <q-icon name="search" />
+              </template>
+            </q-input>
+          </div>
+        </template>
+        <template v-slot:body="props">
+          <q-tr :props="props">
+            <template v-if="props.row.id === editid">
+              <q-td key="detail" :props="props">
+                <q-btn
+                  round
+                  flat
+                  push
+                  color="black"
+                  icon="description"
+                  @click="detailData(props.row)"
+                >
+                  <q-tooltip
+                    content-class="bg-amber text-black shadow-4"
+                    :offset="[10, 10]"
+                    content-style="font-size: 12px"
+                    >{{ "查看单据详情" }}</q-tooltip
+                  >
+                </q-btn>
+              </q-td>
+            </template>
+            <template v-else-if="props.row.id !== editid">
+              <q-td key="detail" :props="props">
+                <q-btn
+                  round
+                  flat
+                  push
+                  color="black"
+                  icon="description"
+                  @click="detailData(props.row)"
+                >
+                  <q-tooltip
+                    content-class="bg-amber text-black shadow-4"
+                    :offset="[10, 10]"
+                    content-style="font-size: 12px"
+                    >{{ "查看批次详情" }}</q-tooltip
+                  >
+                </q-btn>
+              </q-td>
+            </template>
+
+            <template v-if="props.row.id === editid">
+              <q-td key="billId" :props="props">{{ props.row.billId }}</q-td>
+            </template>
+            <template v-else-if="props.row.id !== editid">
+              <q-td key="billId" :props="props">{{ props.row.billId }}</q-td>
+            </template>
+
+            <template v-if="props.row.id === editid">
+              <q-td key="number" :props="props">{{ props.row.number }}</q-td>
+            </template>
+            <template v-else-if="props.row.id !== editid">
+              <q-td key="number" :props="props">{{ props.row.number }}</q-td>
+            </template>
+
+            <template v-if="props.row.id === editid">
+              <q-td key="type" :props="props">
+                <q-select
+                  dense
+                  outlined
+                  square
+                  v-model="editFormData.type"
+                  :label="'单据类型'"
+                  autofocus
+                  :options="bound_code_type_list"
+                  option-label="label"
+                  option-value="value"
+                  emit-value
+                  map-options
+                  transition-show="scale"
+                  transition-hide="scale"
+                  :rules="[(val) => (val && val.length > 0) || error1]"
+                />
+              </q-td>
+            </template>
+            <template v-else-if="props.row.id !== editid">
+              <q-td key="type" :props="props">
+                {{ formatBSType(props.row.type) || props.row.type }}</q-td
+              >
+            </template>
+
+            <template v-if="props.row.id === editid">
+              <q-td key="department" :props="props">
+                <q-select
+                  dense
+                  outlined
+                  square
+                  v-model="editFormData.department"
+                  :label="'部门'"
+                  :options="bound_department_list"
+                  option-label="label"
+                  option-value="value"
+                  emit-value
+                  map-options
+                  transition-show="scale"
+                  transition-hide="scale"
+                  :rules="[(val) => (val && val.length > 0) || error1]"
+                />
+              </q-td>
+            </template>
+            <template v-else-if="props.row.id !== editid">
+              <q-td key="department" :props="props">
+                {{
+                  bound_department_map[props.row.department] ||
+                  props.row.department
+                }}</q-td
+              >
+            </template>
+
+            <template v-if="props.row.id === editid">
+              <q-td key="date" :props="props">{{ props.row.date }}</q-td>
+            </template>
+            <template v-else-if="props.row.id !== editid">
+              <q-td key="date" :props="props">{{ props.row.date }}</q-td>
+            </template>
+
+            <template v-if="props.row.id === editid">
+              <q-td key="creater" :props="props">
+                <q-input
+                  dense
+                  outlined
+                  square
+                  v-model.number="editFormData.creater"
+                  :label="'经办人'"
+                  :rules="[(val) => (val && val > 0) || error1]"
+                />
+              </q-td>
+            </template>
+            <template v-else-if="props.row.id !== editid">
+              <q-td key="creater" :props="props">{{ props.row.creater }}</q-td>
+            </template>
+
+            <template v-if="props.row.id === editid">
+              <q-td key="bound_status" :props="props">
+                {{
+                  formatStatusType(props.row.bound_status) ||
+                  props.row.bound_status
+                }}</q-td
+              >
+            </template>
+            <template v-else-if="props.row.id !== editid">
+              <q-td key="bound_status" :props="props">
+                {{
+                  formatStatusType(props.row.bound_status) ||
+                  props.row.bound_status
+                }}</q-td
+              >
+            </template>
+
+            <template v-if="!editMode">
+              <q-td key="action" :props="props" style="width: 100px">
+                <q-btn
+                  round
+                  flat
+                  push
+                  color="dark"
+                  icon="trolley"
+                  @click="change_status(props.row)"
+                >
+                  <q-tooltip
+                    content-class="bg-amber text-black shadow-4"
+                    :offset="[10, 10]"
+                    content-style="font-size: 12px"
+                    >单据无误</q-tooltip
+                  >
+                </q-btn>
+              </q-td>
+            </template>
+            <template v-else-if="editMode">
+              <template v-if="props.row.id === editid">
+                <q-td key="action" :props="props" style="width: 100px">
+                  <q-btn
+                    round
+                    flat
+                    push
+                    color="secondary"
+                    icon="check"
+                    @click="editDataSubmit()"
+                  >
+                    <q-tooltip
+                      content-class="bg-amber text-black shadow-4"
+                      :offset="[10, 10]"
+                      content-style="font-size: 12px"
+                      >{{ $t("confirmedit") }}</q-tooltip
+                    >
+                  </q-btn>
+                  <q-btn
+                    round
+                    flat
+                    push
+                    color="red"
+                    icon="close"
+                    @click="editDataCancel()"
+                  >
+                    <q-tooltip
+                      content-class="bg-amber text-black shadow-4"
+                      :offset="[10, 10]"
+                      content-style="font-size: 12px"
+                      >{{ $t("canceledit") }}</q-tooltip
+                    >
+                  </q-btn>
+                </q-td>
+              </template>
+              <template v-else-if="props.row.id !== editid"></template>
+            </template>
+          </q-tr>
+        </template>
+      </q-table>
+    </transition>
+    <template>
+      <div v-show="max !== 0" class="q-pa-lg flex flex-center">
+        <div>{{ total }}</div>
+        <q-pagination
+          v-model="current"
+          color="black"
+          :max="max"
+          :max-pages="6"
+          boundary-links
+          @click="
+            getSearchList(current);
+            paginationIpt = current;
+          "
+        />
+        <div>
+          <input
+            v-model="paginationIpt"
+            @blur="changePageEnter"
+            @keyup.enter="changePageEnter"
+            style="width: 60px; text-align: center"
+          />
+        </div>
+      </div>
+      <div v-show="max === 0" class="q-pa-lg flex flex-center">
+        <q-btn flat push color="dark" :label="$t('no_data')"></q-btn>
+      </div>
+    </template>
+
+    <q-dialog
+      v-model="detailForm"
+      transition-show="jump-down"
+      transition-hide="jump-up"
+    >
+      <q-card style="min-width: 900px; position: relative">
+        <q-bar
+          class="bg-light-blue-10 text-white rounded-borders"
+          style="height: 50px"
+        >
+          <div>
+            {{ "单据信息" }}
+          </div>
+          <q-space></q-space>
+          <q-btn dense flat icon="close" v-close-popup>
+            <q-tooltip
+              content-class="bg-amber text-black shadow-4"
+              :offset="[20, 20]"
+              content-style="font-size: 12px"
+            >
+              {{ $t("index.close") }}</q-tooltip
+            >
+          </q-btn>
+        </q-bar>
+        <q-card-section class="q-pt-md">
+          <q-tabs v-model="activeTab">
+            <q-tab name="tab1" label="单据信息" />
+            <!-- <q-tab name="tab2" label="货物信息" /> -->
+          </q-tabs>
+        </q-card-section>
+        <!-- 选项卡内容 -->
+        <q-tab-panels v-model="activeTab" animated>
+          <q-tab-panel name="tab1" style="height: 70px">
+            <div class="row q-gutter-x-md">
+              <div class="col column q-gutter-y-md">
+                <q-input
+                  dense
+                  outlined
+                  square
+                  v-model="table_detail.date"
+                  :label="'单据时间'"
+                  :readonly="true"
+                />
+              </div>
+              <div class="col column q-gutter-y-md">
+                <q-input
+                  dense
+                  outlined
+                  square
+                  v-model="table_detail.number"
+                  :label="'单据编码'"
+                  :readonly="true"
+                />
+              </div>
+            </div>
+          </q-tab-panel>
+        </q-tab-panels>
+
+        <div
+          style="float: right; padding: 15px 15px 50px 15px; min-width: 100%"
+          flow="row wrap"
+        >
+          <q-card class="q-mb-md" bordered>
+            <q-card-section>
+              <template>
+                <div class="text-h6 q-mb-md">{{ "批次信息" }}</div>
+                <template v-if="batch_detail.length > 0">
+                  <div
+                    v-for="(item, index) in batch_detail"
+                    :key="index"
+                    class="row q-col-gutter-md q-mb-sm"
+                  >
+                    <div class="col">
+                      <q-input
+                        v-model="item.entryIds"
+                        :label="'明细id'"
+                        :readonly="onlyread"
+                        dense
+                        outlined
+                      />
+                    </div>
+                    <div class="col" style="min-width: 150px">
+                      <q-input
+                        v-model="item.production_batch"
+                        :label="'批次号'"
+                        :readonly="onlyread"
+                        dense
+                        outlined
+                      />
+                    </div>
+                    <div class="col">
+                      <q-input
+                        v-model="item.goods_name"
+                        :label="'货物名称'"
+                        :readonly="onlyread"
+                        dense
+                        outlined
+                      />
+                    </div>
+                    <div class="col">
+                      <q-input
+                        v-model="item.plan_qty"
+                        :label="'计划数量'"
+                        :readonly="onlyread"
+                        dense
+                        outlined
+                      />
+                    </div>
+                    <div class="col">
+                      <q-input
+                        v-model="item.goods_unit"
+                        :label="'单位'"
+                        :readonly="onlyread"
+                        dense
+                        outlined
+                      />
+                    </div>
+                  </div>
+                </template>
+              </template>
+            </q-card-section>
+          </q-card>
+        </div>
+      </q-card>
+    </q-dialog>
+    <q-dialog
+      v-model="confirmForm"
+      position="top"
+      transition-show="scale"
+      transition-hide="scale"
+    >
+      <q-card class="shadow-24">
+        <q-card-section style="max-height: 325px; width: 500px" class="scroll">
+          <div class="text-h6 q-mb-md">{{ "确认入库单" }}</div>
+          确定现场数目与入库汇报{{ choose_bill_code }}单计划数目一致吗?
+        </q-card-section>
+        <div style="float: right; padding: 15px 15px 15px 0">
+          <q-btn
+            color="white"
+            text-color="black"
+            style="margin-right: 25px"
+            @click="confirmForm = false"
+            >{{ $t("cancel") }}</q-btn
+          >
+          <q-btn color="primary" @click="confirm_status">{{
+            $t("submit")
+          }}</q-btn>
+        </div>
+      </q-card>
+    </q-dialog>
+  </div>
+</template>
+<router-view />
+
+<script>
+import { getauth, postauth, putauth, deleteauth } from "boot/axios_request";
+
+import { date, exportFile, LocalStorage } from "quasar";
+import { QToggle } from "quasar";
+
+export default {
+  components: {
+    QToggle,
+  },
+  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",
+      loading: false,
+      height: "",
+
+      printObj: {
+        id: "printMe",
+        popTitle: this.$t("inbound.asn"),
+      },
+      table_list: [],
+      table_detail: {},
+      batch_detail: [],
+      bound_code_type_list: [],
+      bound_code_type_map: [],
+      bound_bs_type_list: [],
+      bound_bs_type_map: [],
+      bound_desc_list: [],
+      bound_desc_map: [],
+      bound_department_list: [],
+      bound_department_map: [],
+      bound_status_list: [],
+
+      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: "department",
+          label: "部门",
+          field: "department",
+          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: "action", label: "操作", align: "center" },
+      ],
+      filter: "",
+      product_filter: "",
+      pagination: {
+        page: 1,
+        rowsPerPage: 11,
+      },
+      newForm: false,
+      newBatchForm: false,
+      newFormData: {},
+      newBatchFormData: {},
+      newDetailFormData: {},
+      editid: 0,
+      editFormData: {},
+      editMode: false,
+      deleteForm: false,
+      detailForm: false,
+      deleteid: 0,
+      detailid: 0,
+      bar_code: "",
+      error1: this.$t("goods.view_goodslist.error1"),
+
+      max: 0,
+      total: 0,
+      paginationIpt: 1,
+      current: 1,
+      onlyread: false,
+      bound_batch_list: [],
+      activeTab: "tab1",
+      confirmForm: false,
+      choose_bill_id: "",
+      choose_bill_code: "",
+    };
+  },
+  computed: {
+    interval() {
+      return (
+        this.$t("download_center.start") +
+        " - " +
+        this.$t("download_center.end")
+      );
+    },
+  },
+  methods: {
+    formatBSType(type) {
+      switch (type) {
+        case 1:
+          return "生产入库申请";
+        case 2:
+          return "采购入库申请";
+        case 3:
+          return "其他入库";
+        case 4:
+          return "调拨入库";
+
+        default:
+          return "未知";
+      }
+    },
+    formatStatusType(type) {
+      switch (type) {
+        case 0:
+          return "待审核";
+        case 1:
+          return "确认无误";
+        case 3:
+          return "其他入库";
+        case 4:
+          return "调拨入库";
+
+        default:
+          return "未知";
+      }
+    },
+    getList(params = {}) {
+      var _this = this;
+      _this.loading = true;
+      // 合并基础参数
+      const baseParams = {
+        page: _this.current,
+        base_type: "0",
+        page_size: _this.pagination.rowsPerPage,
+      };
+
+      // 创建URLSearchParams处理参数
+      const queryParams = new URLSearchParams({
+        ...baseParams,
+        ...params,
+      });
+      console.log(queryParams);
+      // 过滤空值参数
+      Array.from(queryParams.entries()).forEach(([key, value]) => {
+        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;
+        })
+        .catch((err) => {
+          _this.$q.notify({
+            message: err.detail,
+            icon: "close",
+            color: "negative",
+          });
+        })
+        .finally(() => {
+          _this.loading = false;
+        });
+    },
+    changePageEnter() {
+      if (Number(this.paginationIpt) < 1) {
+        this.current = 1;
+        this.paginationIpt = 1;
+      } else if (Number(this.paginationIpt) > this.max) {
+        this.current = this.max;
+        this.paginationIpt = this.max;
+      } else {
+        this.current = Number(this.paginationIpt);
+      }
+      this.getSearchList(this.current);
+    },
+
+    // 带搜索条件加载
+    getSearchList(page = 1) {
+      this.current = page;
+      this.paginationIpt = page;
+      this.getList({
+        number__icontains: this.filter,
+        document_date__range: this.date_range,
+      });
+    },
+    getfileList() {
+      var _this = this;
+      _this.loading = true;
+      const params = {
+        goods_desc__icontains: _this.filter,
+        document_date__range: _this.date_range,
+      };
+      const queryParams = new URLSearchParams({
+        ...params,
+      });
+      console.log(queryParams);
+      // 过滤空值参数
+      Array.from(queryParams.entries()).forEach(([key, value]) => {
+        if (value === "" || value === null || value === undefined) {
+          queryParams.delete(key);
+        }
+      });
+      console.log(`${_this.pathfilename}?${queryParams}`);
+      getauth(`${_this.pathfilename}?${queryParams}`)
+        .then((res) => {
+          var timeStamp = Date.now();
+          var formattedString = date.formatDate(timeStamp, "YYYYMMDDHHmmss");
+          const status = exportFile(
+            _this.pathfilename + "list" + formattedString + ".csv",
+            "\uFEFF" + res,
+            "text/csv"
+          );
+          if (status !== true) {
+            _this.$q.notify({
+              message: "Browser denied file download...",
+              color: "negative",
+              icon: "warning",
+            });
+          }
+        })
+        .catch((err) => {
+          _this.$q.notify({
+            message: err.detail,
+            icon: "close",
+            color: "negative",
+          });
+        })
+        .finally(() => {
+          _this.loading = false;
+        });
+    },
+
+    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;
+          })
+          .catch((err) => {
+            _this.$q.notify({
+              message: err.detail,
+              icon: "close",
+              color: "negative",
+            });
+          });
+      } else {
+      }
+    },
+    getListNext() {
+      var _this = this;
+      if (LocalStorage.has("auth")) {
+        getauth(_this.pathname_next, {})
+          .then((res) => {
+            _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",
+            });
+          });
+      }
+    },
+    reFresh() {
+      var _this = this;
+      _this.getSearchList();
+    },
+
+    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;
+    },
+    confirm_status() {
+      var _this = this;
+      _this.loading = true;
+      const params = {
+        billId: _this.choose_bill_id,
+      };
+      postauth("wms/generateinbound", params)
+        .then((res) => {
+          if (res.code == 200) {
+            _this.$q.notify({
+              message: "入库单生成成功,请到入库管理中查看",
+              icon: "check",
+              color: "green",
+            });
+          }
+          if (res.code == 400) {
+            _this.$q.notify({
+              message: res.error,
+              icon: "info",
+              color: "info",
+            });
+          }
+        })
+        .finally(() => {
+          _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 + "/")
+        .then((res) => {
+          _this.table_detail = res;
+        })
+        .catch((err) => {
+          _this.$q.notify({
+            message: err.detail,
+            icon: "close",
+            color: "negative",
+          });
+        });
+      console.log("detail查询的结果是:", _this.table_detail);
+
+      getauth("wms/materials/?bound_billId=" + _this.detailid)
+        .then((res) => {
+          _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);
+    },
+    deleteDataSubmit() {
+      var _this = this;
+      deleteauth(_this.pathname + _this.deleteid + "/")
+        .then((res) => {
+          _this.deleteDataCancel();
+          _this.getSearchList();
+          _this.$q.notify({
+            message: "成功删除数据",
+            icon: "check",
+            color: "green",
+          });
+        })
+        .catch((err) => {
+          _this.$q.notify({
+            message: err.detail,
+            icon: "close",
+            color: "negative",
+          });
+        });
+    },
+    deleteDataCancel() {
+      var _this = this;
+      _this.deleteForm = false;
+      _this.deleteid = 0;
+    },
+
+    updateProxy() {
+      var _this = this;
+      _this.proxyDate = _this.date;
+    },
+  },
+  created() {
+    var _this = this;
+    if (LocalStorage.has("openid")) {
+      _this.openid = LocalStorage.getItem("openid");
+    } else {
+      _this.openid = "";
+      LocalStorage.set("openid", "");
+    }
+    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("login_name")) {
+      _this.login_name = LocalStorage.getItem("login_name");
+    } else {
+      _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();
+    } else {
+      _this.authin = "0";
+    }
+    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,
+        }));
+        // 编码 → 名称的映射(普通对象,确保响应式)
+        _this.bound_code_type_map = res.results.reduce((acc, item) => {
+          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",
+        });
+      });
+
+    getauth("warehouse/boundtype/", {})
+      .then((res) => {
+        _this.bound_desc_list = res.results.map((item) => ({
+          label: item.bound_type_name,
+          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;
+        }, {});
+      })
+      .catch((err) => {
+        _this.$q.notify({
+          message: err.detail,
+          icon: "close",
+          color: "negative",
+        });
+      });
+
+    getauth("warehouse/department/", {})
+      .then((res) => {
+        _this.bound_department_list = res.results.map((item) => ({
+          label: item.department_name,
+          value: item.department_code,
+        }));
+        _this.bound_department_map = res.results.reduce((acc, item) => {
+          acc[item.department_code] = item.department_name;
+          return acc;
+        }, {});
+      })
+      .catch((err) => {
+        _this.$q.notify({
+          message: err.detail,
+          icon: "close",
+          color: "negative",
+        });
+      });
+
+    getauth("warehouse/boundbusiness/", {})
+      .then((res) => {
+        _this.bound_bs_type_list = res.results.map((item) => ({
+          label: item.bound_bs_name,
+          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;
+        }, {});
+      })
+      .catch((err) => {
+        _this.$q.notify({
+          message: err.detail,
+          icon: "close",
+          color: "negative",
+        });
+      });
+  },
+
+  mounted() {
+    var _this = this;
+    if (_this.$q.platform.is.electron) {
+      _this.height = String(_this.$q.screen.height - 290) + "px";
+    } else {
+      _this.height = _this.$q.screen.height - 290 + "" + "px";
+    }
+    _this.newFormData.creater = _this.login_name;
+  },
+  updated() {},
+  destroyed() {},
+};
+</script>
+<style scoped>
+/* 添加在 <style> 中 */
+.q-date__calendar-item--selected {
+  transition: all 0.3s ease;
+  background-color: #1976d2 !important;
+}
+
+.q-date__range {
+  background-color: rgba(25, 118, 210, 0.1);
+}
+
+:deep(.q-field__label) {
+  margin-top: 8px;
+  align-self: center;
+}
+
+:deep(.q-field__control-container) {
+  padding-left: 50px;
+  margin-top: -5px;
+}
+</style>

Datei-Diff unterdrückt, da er zu groß ist
+ 654 - 524
templates/src/pages/erp/erpdn.vue


+ 368 - 233
templates/src/pages/erp/erpsortstock.vue

@@ -1,44 +1,86 @@
 <template>
-  <div >
-
+  <div>
     <transition appear enter-active-class="animated fadeIn">
-      <q-table class="my-sticky-header-column-table shadow-24" :data="table_list" row-key="id" :separator="separator"
-        :loading="loading" :columns="columns" hide-bottom :pagination.sync="pagination" no-data-label="No data"
-        no-results-label="No data you want" :table-style="{ height: height }" flat bordered>
+      <q-table
+        class="my-sticky-header-column-table shadow-24"
+        :data="table_list"
+        row-key="id"
+        :separator="separator"
+        :loading="loading"
+        :columns="columns"
+        hide-bottom
+        :pagination.sync="pagination"
+        no-data-label="No data"
+        no-results-label="No data you want"
+        :table-style="{ height: height }"
+        flat
+        bordered
+      >
         <template v-slot:top>
           <q-btn-group push>
-
             <q-btn :label="$t('refresh')" icon="refresh" @click="reFresh()">
-              <q-tooltip content-class="bg-amber text-black shadow-4" :offset="[10, 10]"
-                content-style="font-size: 12px">{{ $t('refreshtip') }}</q-tooltip>
+              <q-tooltip
+                content-class="bg-amber text-black shadow-4"
+                :offset="[10, 10]"
+                content-style="font-size: 12px"
+                >{{ $t("refreshtip") }}</q-tooltip
+              >
             </q-btn>
-
           </q-btn-group>
 
           <q-space />
 
           <div class="flex items-center">
             <div class="q-mr-md">{{ $t("download_center.createTime") }}</div>
-            <q-input readonly outlined dense v-model="createDate2" :placeholder="interval">
+            <q-input
+              readonly
+              outlined
+              dense
+              v-model="createDate2"
+              :placeholder="interval"
+            >
               <template v-slot:append>
                 <q-icon name="event" class="cursor-pointer">
-                  <q-popup-proxy ref="qDateProxy" transition-show="scale" transition-hide="scale">
+                  <q-popup-proxy
+                    ref="qDateProxy"
+                    transition-show="scale"
+                    transition-hide="scale"
+                  >
                     <q-date v-model="createDate1" range>
                       <div class="row items-center justify-end q-gutter-sm">
-                        <q-btn :label="$t('index.cancel')" color="primary" flat v-close-popup />
-                        <q-btn :label="$t('index.clear')" color="primary" @click="createDate2 = ''; createDate1 = '';"
-                          v-close-popup />
-
+                        <q-btn
+                          :label="$t('index.cancel')"
+                          color="primary"
+                          flat
+                          v-close-popup
+                        />
+                        <q-btn
+                          :label="$t('index.clear')"
+                          color="primary"
+                          @click="
+                            createDate2 = '';
+                            createDate1 = '';
+                          "
+                          v-close-popup
+                        />
                       </div>
                     </q-date>
                   </q-popup-proxy>
                 </q-icon>
               </template>
             </q-input>
-            <q-btn-group push class="q-ml-md">
-            </q-btn-group>
-            <q-input outlined rounded dense debounce="300" color="primary" v-model="filter" :placeholder="$t('search')"
-              @input="getSearchList()" @keyup.enter="getSearchList()">
+            <q-btn-group push class="q-ml-md"> </q-btn-group>
+            <q-input
+              outlined
+              rounded
+              dense
+              debounce="300"
+              color="primary"
+              v-model="filter"
+              :placeholder="$t('search')"
+              @input="getSearchList()"
+              @keyup.enter="getSearchList()"
+            >
               <template v-slot:append>
                 <q-icon name="search" @click="getSearchList()" />
               </template>
@@ -47,339 +89,432 @@
         </template>
         <template v-slot:body="props">
           <q-tr :props="props">
-            <template >
-              <q-td key="document_date" :props="props">{{ props.row.batch_detail.bound_list.bound_date }}</q-td>
-            </template>            
-            <template >
-              <q-td key="document_number" :props="props">{{ props.row.batch_detail.bound_list.bound_code }}</q-td>
+            <template>
+              <q-td key="document_date" :props="props">{{
+                props.row.batch_detail.bound_list.bound_date
+              }}</q-td>
             </template>
-            <template >
-              <q-td key="document_type" :props="props">{{ props.row.batch_detail.bound_list.bound_code_type }}</q-td>
-            </template>            
-            <template >
-              <q-td key="business_type" :props="props">{{ props.row.batch_detail.bound_list.bound_bs_type }}</q-td>
+            <template>
+              <q-td key="document_number" :props="props">{{
+                props.row.batch_detail.bound_list.bound_code
+              }}</q-td>
+            </template>
+            <template>
+              <q-td key="document_type" :props="props">{{
+                props.row.batch_detail.bound_list.bound_code_type
+              }}</q-td>
+            </template>
+            <template>
+              <q-td key="business_type" :props="props">{{
+                props.row.batch_detail.bound_list.bound_bs_type
+              }}</q-td>
+            </template>
+            <template>
+              <q-td key="iout_type" :props="props">{{
+                props.row.batch_detail.bound_list.bound_type
+              }}</q-td>
+            </template>
+            <template>
+              <q-td key="department" :props="props">{{
+                props.row.batch_detail.bound_list.bound_department
+              }}</q-td>
+            </template>
+            <template>
+              <q-td key="warehouse_code" :props="props">{{
+                props.row.batch_detail.bound_batch.warehouse_code
+              }}</q-td>
+            </template>
+            <template>
+              <q-td key="warehouse_name" :props="props">{{
+                props.row.batch_detail.bound_batch.warehouse_name
+              }}</q-td>
+            </template>
+            <template>
+              <q-td key="goods_code" :props="props">{{
+                props.row.batch_detail.bound_batch.goods_code
+              }}</q-td>
+            </template>
+            <template>
+              <q-td key="goods_desc" :props="props">{{
+                props.row.batch_detail.bound_batch.goods_desc
+              }}</q-td>
             </template>
-            <template >
-              <q-td key="iout_type" :props="props">{{ props.row.batch_detail.bound_list.bound_type  }}</q-td>
-            </template>            
-            <template >
-              <q-td key="department" :props="props">{{ props.row.batch_detail.bound_list.bound_department }}</q-td>
-            </template>            
-            <template >
-              <q-td key="warehouse_code" :props="props">{{ props.row.batch_detail.bound_batch.warehouse_code }}</q-td>
-            </template>            
-            <template >
-              <q-td key="warehouse_name" :props="props">{{ props.row.batch_detail.bound_batch.warehouse_name }}</q-td>
-            </template>            
-            <template >
-              <q-td key="goods_code" :props="props">{{ props.row.batch_detail.bound_batch.goods_code }}</q-td>
-            </template>            
-            <template >
-              <q-td key="goods_desc" :props="props">{{ props.row.batch_detail.bound_batch.goods_desc }}</q-td>
-            </template>            
-            
-            <template >
-              <q-td key="goods_std" :props="props">{{ props.row.batch_detail.bound_batch.goods_std }}</q-td>
-            </template>            
-            <template >
-              <q-td key="goods_batch" :props="props">{{ props.row.container_detail.batch.bound_number }}</q-td>
-            </template>            
-            <template >
-              <q-td key="in_batch" :props="props">{{ props.row.container_detail.batch.goods_code}}</q-td>
-            </template>            
-            <template >
-              <q-td key="out_batch" :props="props">{{ props.row.batch_detail.bound_batch.out_batch }}</q-td>
-            </template>            
-            <template >
-              <q-td key="goods_unit" :props="props">{{ props.row.batch_detail.bound_batch.goods_unit }}</q-td>
-            </template>            
-            <template >
-              <q-td key="goods_in" :props="props">{{ props.row.container_detail.goods_qty }}</q-td>
-            </template>            
-            <template >
-              <q-td key="container_number" :props="props">{{ props.row.container_detail.container.container_code }}</q-td>
-            </template>            
-            <template >
-              <q-td key="goods_notes" :props="props">{{ props.row.task_wcs.message}}</q-td>
-            </template>            
-            <template >
-              <q-td key="creator" :props="props">{{ props.row.container_detail.creater}}</q-td>
-            </template>            
- 
-
-
-
-
-
 
+            <template>
+              <q-td key="goods_std" :props="props">{{
+                props.row.batch_detail.bound_batch.goods_std
+              }}</q-td>
+            </template>
+            <template>
+              <q-td key="goods_batch" :props="props">{{
+                props.row.container_detail.batch.bound_number
+              }}</q-td>
+            </template>
+            <template>
+              <q-td key="in_batch" :props="props">{{
+                props.row.container_detail.batch.goods_code
+              }}</q-td>
+            </template>
+            <template>
+              <q-td key="out_batch" :props="props">{{
+                props.row.batch_detail.bound_batch.out_batch
+              }}</q-td>
+            </template>
+            <template>
+              <q-td key="goods_unit" :props="props">{{
+                props.row.batch_detail.bound_batch.goods_unit
+              }}</q-td>
+            </template>
+            <template>
+              <q-td key="goods_in" :props="props">{{
+                props.row.container_detail.goods_qty
+              }}</q-td>
+            </template>
+            <template>
+              <q-td key="container_number" :props="props">{{
+                props.row.container_detail.container.container_code
+              }}</q-td>
+            </template>
+            <template>
+              <q-td key="goods_notes" :props="props">{{
+                props.row.task_wcs.message
+              }}</q-td>
+            </template>
+            <template>
+              <q-td key="creator" :props="props">{{
+                props.row.container_detail.creater
+              }}</q-td>
+            </template>
           </q-tr>
         </template>
       </q-table>
     </transition>
     <template>
       <div v-show="max !== 0" class="q-pa-lg flex flex-center">
-        <div>{{ total }} </div>
-        <q-pagination v-model="current" color="black" :max="max" :max-pages="6" boundary-links
-          @click="getSearchList(current); paginationIpt = current" />
+        <div>{{ total }}</div>
+        <q-pagination
+          v-model="current"
+          color="black"
+          :max="max"
+          :max-pages="6"
+          boundary-links
+          @click="
+            getSearchList(current);
+            paginationIpt = current;
+          "
+        />
         <div>
-          <input v-model="paginationIpt" @blur="changePageEnter" @keyup.enter="changePageEnter"
-            style="width: 60px; text-align: center" />
+          <input
+            v-model="paginationIpt"
+            @blur="changePageEnter"
+            @keyup.enter="changePageEnter"
+            style="width: 60px; text-align: center"
+          />
         </div>
       </div>
       <div v-show="max === 0" class="q-pa-lg flex flex-center">
         <q-btn flat push color="dark" :label="$t('no_data')"></q-btn>
       </div>
     </template>
-
   </div>
 </template>
 <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',
+  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', required: true, label: '入库时间', align: 'center', field: 'document_date' },
-          { name: 'document_number', label: '单据编号', field: 'document_number', align: 'center' },
-          { name: 'department', label: '部门', field: 'department', align: 'center' },
-
-          { name: 'goods_code', label: '存货编码', field: 'goods_code', align: 'center' },
-          { name: 'goods_desc', label: '存货', field: 'goods_desc', align: 'center' },
-          { name: 'goods_std', label: '规格型号', field: 'goods_std', align: 'center' },
-          { name: 'goods_batch', label: '入库批号', field: 'goods_batch', align: 'center' },
-
-
-          { name: 'goods_in', label: '入库数目', field: 'goods_in', 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' },
-
-        ],
-      filter: '',
+        {
+          name: "document_date",
+          required: true,
+          label: "入库时间",
+          align: "center",
+          field: "document_date",
+        },
+        {
+          name: "document_number",
+          label: "单据编号",
+          field: "document_number",
+          align: "center",
+        },
+        {
+          name: "department",
+          label: "部门",
+          field: "department",
+          align: "center",
+        },
+
+        {
+          name: "goods_code",
+          label: "存货编码",
+          field: "goods_code",
+          align: "center",
+        },
+        {
+          name: "goods_desc",
+          label: "存货",
+          field: "goods_desc",
+          align: "center",
+        },
+        {
+          name: "goods_std",
+          label: "规格型号",
+          field: "goods_std",
+          align: "center",
+        },
+        {
+          name: "goods_batch",
+          label: "入库批号",
+          field: "goods_batch",
+          align: "center",
+        },
+
+        {
+          name: "goods_in",
+          label: "入库数目",
+          field: "goods_in",
+          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" },
+      ],
+      filter: "",
       pagination: {
         page: 1,
-        rowsPerPage: 11
+        rowsPerPage: 11,
       },
       current: 1,
       max: 0,
       total: 0,
       paginationIpt: 1,
       current: 1,
-
-    }
-
+    };
   },
   computed: {
     interval() {
-      return this.$t('download_center.start') + ' - ' + this.$t('download_center.end')
-    }
+      return (
+        this.$t("download_center.start") +
+        " - " +
+        this.$t("download_center.end")
+      );
+    },
   },
   methods: {
     getList(params = {}) {
-      var _this = this
-      _this.loading = true
+      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
+        .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;
         })
-        .catch(err => {
+        .catch((err) => {
           _this.$q.notify({
             message: err.detail,
-            icon: 'close',
-            color: 'negative'
-          })
+            icon: "close",
+            color: "negative",
+          });
         })
         .finally(() => {
-          _this.loading = false
-        })
+          _this.loading = false;
+        });
     },
     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
+      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')) {
+      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
+          .then((res) => {
+            _this.table_list = res.results;
+            _this.pathname_previous = res.previous;
+            _this.pathname_next = res.next;
           })
-          .catch(err => {
+          .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')) {
+      var _this = this;
+      if (LocalStorage.has("auth")) {
         getauth(_this.pathname_next, {})
-          .then(res => {
-            _this.table_list = res.results
+          .then((res) => {
+            _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 => {
+          .catch((err) => {
             _this.$q.notify({
               message: err.detail,
-              icon: 'close',
-              color: 'negative'
-            })
-          })
+              icon: "close",
+              color: "negative",
+            });
+          });
       }
     },
     reFresh() {
-      var _this = this
-      _this.getSearchList()
+      var _this = this;
+      _this.getSearchList();
     },
 
-
     updateProxy() {
-      var _this = this
-      _this.proxyDate = _this.date
-    }
-
+      var _this = this;
+      _this.proxyDate = _this.date;
+    },
   },
   created() {
-    var _this = this
-    if (LocalStorage.has('openid')) {
-      _this.openid = LocalStorage.getItem('openid')
+    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
+    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) {
       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.searchUrl = this.pathname + '?' + 'document_date__year=' + this.dateArray[0] + '&' + 'document_date__month=' + this.dateArray[1] + '&' + 'document_date__day=' + this.dateArray[2]
+          this.createDate2 = `${val}`;
+          this.dateArray = val.split("/");
+          this.searchUrl =
+            this.pathname +
+            "?" +
+            "document_date__year=" +
+            this.dateArray[0] +
+            "&" +
+            "document_date__month=" +
+            this.dateArray[1] +
+            "&" +
+            "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()
-      }
-      else {
-        this.createDate2 = ''
-        this.date_range = ''
-        this.getSearchList()
+        this.getSearchList();
+        this.$refs.qDateProxy.hide();
+      } else {
+        this.createDate2 = "";
+        this.date_range = "";
+        this.getSearchList();
       }
-    }
-  }
-}
+    },
+  },
+};
 </script>
 <style scoped>
 /* 添加在 <style> 中 */
@@ -391,4 +526,4 @@ export default {
 .q-date__range {
   background-color: rgba(25, 118, 210, 0.1);
 }
-</style>
+</style>

Datei-Diff unterdrückt, da er zu groß ist
+ 1138 - 755
templates/src/pages/inbound/asn.vue


+ 39 - 134
templates/src/pages/warehouse/warehouseset.vue

@@ -3,160 +3,68 @@
     <!-- 顶部选项卡 - 增加图标和间距 -->
     <q-tabs
       v-model="activeTab"
-      class="q-mb-lg shadow-2 rounded-tabs"
+      class="q-mb-lg shadow-2"
       active-color="primary"
       indicator-color="primary"
       dense
-      align = "left"
+      align="left"
     >
-      <q-tab 
-        name="account" 
-        icon="verified_user" 
+      <q-tab
+        name="account"
+        icon="verified_user"
         label="认证设置"
-        class="q-px-md q-py-xs"
-        
+
       />
-      <q-tab 
-        name="activity" 
+      <q-tab
+        name="activity"
         icon="activity"
         label="活动日志"
-        class="q-px-md q-py-xs"
+
       />
-      <q-tab 
-        name="timeline" 
+      <q-tab
+        name="timeline"
         icon="timeline"
         label="时间线"
-        class="q-px-md q-py-xs"
+
       />
     </q-tabs>
 
     <!-- 内容区域 - 增加卡片圆角和阴影 -->
-    <q-tab-panels 
-      v-model="activeTab" 
+    <q-tab-panels
+      v-model="activeTab"
       animated
       transition-prev="scale"
       transition-next="scale"
-
     >
       <q-tab-panel name="account">
-        <!-- 账户信息卡片 -->
-        <q-card class="q-mb-md rounded-card shadow-3">
-          <q-expansion-item
-            v-model="expanded.accountInfo"
-            icon="person_outline"
-            label="账户信息"
-            header-class=" text-weight-medium text-primary"
-            class="q-pa-sm"
-          >
-            <q-card-section class="q-pt-none">
-              <div class="row q-col-gutter-y-md">
-                <div class="col-12 col-md-6">
-                  <q-input
-                    outlined
-                    label="姓名"
-                    v-model="formData.name"
-                    color="primary"
-                    bg-color="white"
-                    dense
-                    :rules="[val => !!val || '此项为必填项']"
-                  >
-                    <template v-slot:prepend>
-                      <q-icon name="badge" color="primary" />
-                    </template>
-                  </q-input>
-                </div>
-                
-                <div class="col-12 col-md-6">
-                  <q-input
-                    outlined
-                    label="电子邮箱"
-                    type="email"
-                    v-model="formData.email"
-                    color="primary"
-                    bg-color="white"
-                    dense
-                    :rules="[
-                      val => !!val || '此项为必填项',
-                      val => /.+@.+\..+/.test(val) || '邮箱格式不正确'
-                    ]"
-                  >
-                    <template v-slot:prepend>
-                      <q-icon name="email" color="primary" />
-                    </template>
-                  </q-input>
-                </div>
-
-                <!-- 操作按钮组 -->
-                <div class="col-12 q-pt-md">
-                  <div class="flex items-center justify-end q-gutter-x-sm">
-                    <q-btn
-                      color="primary"
-                      label="更新信息"
-                      icon="save"
-                      @click="saveSettings"
-                      padding="sm md"
-                      class="rounded-btn"
-                      glossy
-                    />
-                    <q-btn
-                      color="grey-7"
-                      icon="more_vert"
-                      round
-                      dense
-                    >
-                      <q-menu auto-close anchor="bottom end" self="top end">
-                        <q-list class="q-py-sm" style="min-width: 180px">
-                          <q-item clickable class="text-primary">
-                            <q-item-section avatar>
-                              <q-icon name="download" />
-                            </q-item-section>
-                            <q-item-section>导出配置</q-item-section>
-                          </q-item>
-                          <q-separator />
-                          <q-item clickable class="text-grey-8">
-                            <q-item-section avatar>
-                              <q-icon name="tune" />
-                            </q-item-section>
-                            <q-item-section>高级选项</q-item-section>
-                          </q-item>
-                        </q-list>
-                      </q-menu>
-                    </q-btn>
-                  </div>
-                </div>
-              </div>
-            </q-card-section>
-          </q-expansion-item>
-        </q-card>
-
         <!-- 安全设置卡片 -->
-        <q-card class="rounded-card shadow-3">
+        <q-card >
           <q-expansion-item
             v-model="expanded.security"
             icon="lock"
             label="安全设置"
-            header-class="text-weight-medium text-primary"
-            class="q-pa-sm"
+   
+       
           >
             <q-card-section class="q-pt-none">
               <div class="row q-col-gutter-y-md">
                 <div class="col-12 col-md-6">
                   <q-input
                     outlined
-                    label="当前码"
+                    label="当前验证码"
                     type="password"
                     v-model="formData.password"
                     color="primary"
                     bg-color="white"
                     dense
-                    :rules="[val => val.length >= 8 || '至少需要8位字符']"
+                    readonly 
                   >
                     <template v-slot:prepend>
                       <q-icon name="vpn_key" color="primary" />
                     </template>
                   </q-input>
                 </div>
-                
+
                 <div class="col-12 col-md-6">
                   <q-input
                     outlined
@@ -165,7 +73,7 @@
                     color="primary"
                     bg-color="white"
                     dense
-                    :rules="[val => val.length >= 8 || '至少需要8位字符']"
+                    :rules="[(val) => val.length >= 8 || '至少需要8位字符']"
                   >
                     <template v-slot:prepend>
                       <q-icon name="lock_reset" color="primary" />
@@ -182,33 +90,33 @@
 </template>
 
 <script>
-import { ref } from 'vue'
+import { ref } from "vue";
 
 export default {
   setup() {
     return {
-      activeTab: ref('account'),
+      activeTab: ref("account"),
       expanded: ref({
         accountInfo: true,
-        security: false
+        security: false,
       }),
       formData: ref({
-        name: '超级管理员',
-        email: 'admin@example.com',
-        password: ''
+        name: "超级管理员",
+        email: "admin@example.com",
+        password: "",
       }),
       saveSettings() {
-        console.log('Settings saved:', this.formData)
+        console.log("Settings saved:", this.formData);
         this.$q.notify({
-          message: '设置更新成功',
-          color: 'positive',
-          icon: 'check_circle',
-          position: 'top-right'
-        })
-      }
-    }
-  }
-}
+          message: "设置更新成功",
+          color: "positive",
+          icon: "check_circle",
+          position: "top-right",
+        });
+      },
+    };
+  },
+};
 </script>
 
 <style lang="scss" scoped>
@@ -218,10 +126,9 @@ export default {
 }
 
 .rounded-card {
-
   .q-expansion-item {
     transition: all 0.3s ease;
-    
+
     &:hover {
       background: #f8f9fa;
     }
@@ -235,6 +142,4 @@ export default {
 .q-field--outlined :deep(.q-field__control) {
   border-radius: 2px;
 }
-
-
-</style>
+</style>

+ 5 - 0
templates/src/router/routes.js

@@ -110,6 +110,11 @@ const routes = [{
         name: 'erpasn',
         component: () => import('pages/erp/erpasn.vue')
       },
+      {
+        path: 'erpasnaudit',
+        name: 'erpasnaudit',
+        component: () => import('pages/erp/erpasnaudit.vue')
+      },
       {
         path: 'erpdn',
         name: 'erpdn',

BIN
warehouse/__pycache__/models.cpython-38.pyc


+ 28 - 0
warehouse/migrations/0005_baseset.py

@@ -0,0 +1,28 @@
+# Generated by Django 4.1.2 on 2025-05-08 20:40
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('warehouse', '0004_alter_productlistmodel_product_std'),
+    ]
+
+    operations = [
+        migrations.CreateModel(
+            name='baseset',
+            fields=[
+                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('set_name', models.CharField(max_length=255, verbose_name='Set Name')),
+                ('set_value', models.CharField(max_length=9999, verbose_name='Set Value')),
+                ('set_desc', models.CharField(blank=True, max_length=255, null=True, verbose_name='Set Description')),
+            ],
+            options={
+                'verbose_name': 'Base Set',
+                'verbose_name_plural': 'Base Set',
+                'db_table': 'baseset',
+                'ordering': ['-id'],
+            },
+        ),
+    ]

BIN
warehouse/migrations/__pycache__/0005_baseset.cpython-38.pyc


+ 13 - 0
warehouse/models.py

@@ -116,3 +116,16 @@ class ProductListModel(models.Model):
         verbose_name = 'Product'
         verbose_name_plural = "Product"  
         ordering = ['-id']
+
+
+# 基本设置参数()
+class baseset(models.Model):
+    set_name = models.CharField(max_length=255, verbose_name="Set Name")
+    set_value = models.CharField(max_length=9999, verbose_name="Set Value")
+    set_desc = models.CharField(max_length=255, verbose_name="Set Description", blank=True, null=True)
+    
+    class Meta:
+        db_table = 'baseset'
+        verbose_name = 'Base Set'
+        verbose_name_plural = "Base Set"  
+        ordering = ['-id']