Bladeren bron

版本大更

flower_bs 2 dagen geleden
bovenliggende
commit
6b59ef02b2
48 gewijzigde bestanden met toevoegingen van 738 en 93 verwijderingen
  1. 0 1
      templates/dist/spa/css/12.55c98dcd.css
  2. 1 0
      templates/dist/spa/css/12.71123cd8.css
  3. 0 1
      templates/dist/spa/css/14.e45ece1e.css
  4. 1 0
      templates/dist/spa/css/14.ed8e81e9.css
  5. 0 1
      templates/dist/spa/css/15.389bffe6.css
  6. 1 0
      templates/dist/spa/css/15.3fd341e9.css
  7. 0 1
      templates/dist/spa/css/3.6aff5645.css
  8. 1 0
      templates/dist/spa/css/3.75b6ae63.css
  9. 0 1
      templates/dist/spa/css/4.0ac6b60c.css
  10. 1 0
      templates/dist/spa/css/4.60a85e41.css
  11. 0 1
      templates/dist/spa/css/8.53dd35ce.css
  12. 1 0
      templates/dist/spa/css/8.85ce0f6b.css
  13. 1 1
      templates/dist/spa/index.html
  14. 0 1
      templates/dist/spa/js/12.2aa51f64.js
  15. BIN
      templates/dist/spa/js/12.2aa51f64.js.gz
  16. 1 0
      templates/dist/spa/js/12.fed15142.js
  17. BIN
      templates/dist/spa/js/12.fed15142.js.gz
  18. 0 1
      templates/dist/spa/js/14.543009c4.js
  19. 1 0
      templates/dist/spa/js/14.f187fd27.js
  20. BIN
      templates/dist/spa/js/14.f187fd27.js.gz
  21. 1 0
      templates/dist/spa/js/15.a8dca05d.js
  22. BIN
      templates/dist/spa/js/15.a8dca05d.js.gz
  23. 0 1
      templates/dist/spa/js/15.b31ffe8b.js
  24. BIN
      templates/dist/spa/js/15.b31ffe8b.js.gz
  25. 1 0
      templates/dist/spa/js/3.46fdf3f9.js
  26. BIN
      templates/dist/spa/js/3.46fdf3f9.js.gz
  27. 0 1
      templates/dist/spa/js/3.f96d7c9f.js
  28. BIN
      templates/dist/spa/js/3.f96d7c9f.js.gz
  29. 0 1
      templates/dist/spa/js/4.6f8d1f9d.js
  30. 1 0
      templates/dist/spa/js/4.7303364a.js
  31. BIN
      templates/dist/spa/js/4.7303364a.js.gz
  32. 1 1
      templates/dist/spa/js/44.ddce0eec.js
  33. 0 1
      templates/dist/spa/js/8.9d9149e0.js
  34. BIN
      templates/dist/spa/js/8.9d9149e0.js.gz
  35. 1 0
      templates/dist/spa/js/8.b1eb79a4.js
  36. BIN
      templates/dist/spa/js/8.b1eb79a4.js.gz
  37. BIN
      templates/dist/spa/js/app.c84cfb56.js.gz
  38. 1 1
      templates/dist/spa/js/app.c84cfb56.js
  39. BIN
      templates/dist/spa/js/app.e55d498e.js.gz
  40. BIN
      templates/dist/spa/js/vendor.50835d1f.js.gz
  41. 26 26
      templates/dist/spa/js/vendor.50835d1f.js
  42. BIN
      templates/dist/spa/js/vendor.d8077e0e.js.gz
  43. 164 12
      templates/src/pages/container/containerdetail.vue
  44. 20 2
      templates/src/pages/erp/erpasn.vue
  45. 175 21
      templates/src/pages/inbound/asn.vue
  46. 163 5
      templates/src/pages/inbound/predeliverystock.vue
  47. 6 2
      templates/src/pages/inbound/shortage.vue
  48. 169 10
      templates/src/pages/inbound/sortstock.vue

File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/css/12.55c98dcd.css


File diff suppressed because it is too large
+ 1 - 0
templates/dist/spa/css/12.71123cd8.css


+ 0 - 1
templates/dist/spa/css/14.e45ece1e.css

@@ -1 +0,0 @@
-.q-date__calendar-item--selected[data-v-2edd28fc]{transition:all 0.3s ease;background-color:#1976d2!important}.q-date__range[data-v-2edd28fc]{background-color:rgba(25,118,210,0.1)}.custom-title[data-v-2edd28fc]{font-size:0.9rem;font-weight:500}.custom-timeline[data-v-2edd28fc]{--q-timeline-color:#e0e0e0}.custom-node .q-timeline__dot[data-v-2edd28fc]{background:#485573!important;border:2px solid #5c6b8c!important}.custom-node .q-timeline__content[data-v-2edd28fc]{color:#485573}

+ 1 - 0
templates/dist/spa/css/14.ed8e81e9.css

@@ -0,0 +1 @@
+.q-date__calendar-item--selected[data-v-18cb7066]{transition:all 0.3s ease;background-color:#1976d2!important}.q-date__range[data-v-18cb7066]{background-color:rgba(25,118,210,0.1)}.custom-title[data-v-18cb7066]{font-size:0.9rem;font-weight:500}.custom-timeline[data-v-18cb7066]{--q-timeline-color:#e0e0e0}.custom-node .q-timeline__dot[data-v-18cb7066]{background:#485573!important;border:2px solid #5c6b8c!important}.custom-node .q-timeline__content[data-v-18cb7066]{color:#485573}

+ 0 - 1
templates/dist/spa/css/15.389bffe6.css

@@ -1 +0,0 @@
-.q-date__calendar-item--selected[data-v-50b3cab6]{transition:all 0.3s ease;background-color:#1976d2!important}.q-date__range[data-v-50b3cab6]{background-color:rgba(25,118,210,0.1)}.custom-title[data-v-50b3cab6]{font-size:0.9rem;font-weight:500}.custom-timeline[data-v-50b3cab6]{--q-timeline-color:#e0e0e0}.custom-node .q-timeline__dot[data-v-50b3cab6]{background:#485573!important;border:2px solid #5c6b8c!important}.custom-node .q-timeline__content[data-v-50b3cab6]{color:#485573}

+ 1 - 0
templates/dist/spa/css/15.3fd341e9.css

@@ -0,0 +1 @@
+.q-date__calendar-item--selected[data-v-1d4af14e]{transition:all 0.3s ease;background-color:#1976d2!important}.q-date__range[data-v-1d4af14e]{background-color:rgba(25,118,210,0.1)}.custom-title[data-v-1d4af14e]{font-size:0.9rem;font-weight:500}.custom-timeline[data-v-1d4af14e]{--q-timeline-color:#e0e0e0}.custom-node .q-timeline__dot[data-v-1d4af14e]{background:#485573!important;border:2px solid #5c6b8c!important}.custom-node .q-timeline__content[data-v-1d4af14e]{color:#485573}

File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/css/3.6aff5645.css


File diff suppressed because it is too large
+ 1 - 0
templates/dist/spa/css/3.75b6ae63.css


+ 0 - 1
templates/dist/spa/css/4.0ac6b60c.css

@@ -1 +0,0 @@
-.q-date__calendar-item--selected[data-v-3b1d1346]{transition:all 0.3s ease;background-color:#1976d2!important}.q-date__range[data-v-3b1d1346]{background-color:rgba(25,118,210,0.1)}

+ 1 - 0
templates/dist/spa/css/4.60a85e41.css

@@ -0,0 +1 @@
+.q-date__calendar-item--selected[data-v-14975a4a]{transition:all 0.3s ease;background-color:#1976d2!important}.q-date__range[data-v-14975a4a]{background-color:rgba(25,118,210,0.1)}

File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/css/8.53dd35ce.css


File diff suppressed because it is too large
+ 1 - 0
templates/dist/spa/css/8.85ce0f6b.css


File diff suppressed because it is too large
+ 1 - 1
templates/dist/spa/index.html


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/12.2aa51f64.js


BIN
templates/dist/spa/js/12.2aa51f64.js.gz


File diff suppressed because it is too large
+ 1 - 0
templates/dist/spa/js/12.fed15142.js


BIN
templates/dist/spa/js/12.fed15142.js.gz


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/14.543009c4.js


File diff suppressed because it is too large
+ 1 - 0
templates/dist/spa/js/14.f187fd27.js


BIN
templates/dist/spa/js/14.f187fd27.js.gz


File diff suppressed because it is too large
+ 1 - 0
templates/dist/spa/js/15.a8dca05d.js


BIN
templates/dist/spa/js/15.a8dca05d.js.gz


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/15.b31ffe8b.js


BIN
templates/dist/spa/js/15.b31ffe8b.js.gz


File diff suppressed because it is too large
+ 1 - 0
templates/dist/spa/js/3.46fdf3f9.js


BIN
templates/dist/spa/js/3.46fdf3f9.js.gz


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/3.f96d7c9f.js


BIN
templates/dist/spa/js/3.f96d7c9f.js.gz


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/4.6f8d1f9d.js


File diff suppressed because it is too large
+ 1 - 0
templates/dist/spa/js/4.7303364a.js


BIN
templates/dist/spa/js/4.7303364a.js.gz


File diff suppressed because it is too large
+ 1 - 1
templates/dist/spa/js/44.ddce0eec.js


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/8.9d9149e0.js


BIN
templates/dist/spa/js/8.9d9149e0.js.gz


File diff suppressed because it is too large
+ 1 - 0
templates/dist/spa/js/8.b1eb79a4.js


BIN
templates/dist/spa/js/8.b1eb79a4.js.gz


BIN
templates/dist/spa/js/app.c84cfb56.js.gz


File diff suppressed because it is too large
+ 1 - 1
templates/dist/spa/js/app.c84cfb56.js


BIN
templates/dist/spa/js/app.e55d498e.js.gz


BIN
templates/dist/spa/js/vendor.50835d1f.js.gz


File diff suppressed because it is too large
+ 26 - 26
templates/dist/spa/js/vendor.50835d1f.js


BIN
templates/dist/spa/js/vendor.d8077e0e.js.gz


+ 164 - 12
templates/src/pages/container/containerdetail.vue

@@ -5,6 +5,33 @@
         <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:header-cell="props">
+          <q-th :props="props" @dblclick="handleHeaderDblClick(props.col)">
+            <!-- 为特定列添加下拉选择器 -->
+            <template v-if="['bound_department'].includes(props.col.name)">
+              <q-select
+                dense
+                outlined
+                v-model="filterModels[props.col.name]"
+                :options="getFilterOptions(props.col.name)"
+                option-label="label"
+                option-value="value"
+                emit-value
+                map-options
+                clearable
+                @input="handleFilterChange"
+                style="min-width: 120px"
+              >
+                <template v-slot:prepend>
+                  <span class="text-caption">{{ props.col.label }}</span>
+                </template>
+              </q-select>
+            </template>
+            <template v-else>
+              {{ props.col.label }}
+            </template>
+          </q-th>
+        </template>
           <template v-slot:top>
             <q-btn-group push>
 
@@ -162,6 +189,12 @@
         total: 0,
         paginationIpt: 1,
         current: 1,
+        filterModels: {
+        bound_department: null
+      },
+      filterdata: {},
+      activeSearchField: '',
+      activeSearchLabel: ''
   
       }
   
@@ -172,6 +205,110 @@
       }
     },
     methods: {
+       // 处理过滤变化
+    handleFilterChange () {
+      this.pagination.page = 1
+      this.getSearchList(1)
+    },
+
+    getFilterOptions (columnName) {
+      switch (columnName) {
+        case 'type':
+          return [
+            { label: '生产入库', value: 1 },
+            { label: '采购入库', value: 2 },
+            { label: '其他入库', value: 3 },
+            { label: '调拨入库', value: 4 }
+          ]
+        case 'bound_status':
+          return [
+            { label: '待审核', value: 0 },
+            { label: '确认无误', value: 1 }
+          ]
+        case 'bound_department':
+          return this.bound_department_list
+        default:
+          return []
+      }
+    },
+    handleHeaderDblClick (column) {
+      // 排除不需要搜索的列
+      if (['detail', 'action'].includes(column.name)) return
+
+      this.activeSearchField = column.field
+      this.activeSearchLabel = column.label
+
+      // 弹出搜索对话框
+      this.$q
+        .dialog({
+          title: `搜索${column.label}`,
+          message: `请输入${column.label}的搜索条件`,
+          prompt: {
+            model: '',
+            type: 'text'
+          },
+          cancel: true,
+          persistent: true
+        })
+        .onOk((data) => {
+          // 执行搜索
+          this.executeColumnSearch(column.field, data)
+        })
+        .onCancel(() => {
+          this.activeSearchField = ''
+          this.activeSearchLabel = ''
+        })
+    },
+    // 执行列搜索
+    executeColumnSearch (field, value) {
+      // 构建搜索参数
+      if (
+        field === 'type' ||
+        field === 'audit_status' ||
+        field === 'save_status' ||
+        field === 'bound_status'
+      ) {
+        const searchParams = {
+          [field]: value
+        }
+        // 清除其他搜索条件
+        this.filter = ''
+        this.date_range = ''
+
+        // 执行搜索
+        this.getList({
+          ...searchParams,
+          page: 1
+        })
+
+        // 重置激活的搜索字段
+        this.activeSearchField = ''
+        this.activeSearchLabel = ''
+      } else {
+        const searchParams = {
+          [field + '__icontains']: value
+        }
+        // 清除其他搜索条件
+        this.filter = ''
+        this.date_range = ''
+
+        // 执行搜索
+        this.getList({
+          ...searchParams,
+          page: 1
+        })
+        this.filterdata = searchParams
+        this.$q.notify({
+          message: `已搜索 ${this.activeSearchLabel} 含有 "${value}" 的结果`,
+          icon: 'search',
+          color: 'positive'
+        })
+
+        // // 重置激活的搜索字段
+        this.activeSearchField = ''
+        this.activeSearchLabel = ''
+      }
+    },
       getList(params = {}) {
         var _this = this
         _this.loading = true
@@ -227,14 +364,25 @@
       },
   
       // 带搜索条件加载
-      getSearchList(page = 1) {
-        this.current = page
-        this.paginationIpt = page
-        this.getList({
-          goods_desc__icontains: this.filter,
-          create_time__range: this.date_range
-        })
-      },
+     // 修改搜索方法以包含过滤条件
+    getSearchList (page = 1) {
+      this.current = page
+      this.paginationIpt = page
+
+      // 构建过滤参数
+      const filterParams = {}
+      for (const [key, value] of Object.entries(this.filterModels)) {
+        if (value !== null && value !== '') {
+          filterParams[key] = value
+        }
+      }
+      this.getList({
+        number__icontains: this.filter,
+        document_date__range: this.date_range,
+        ...filterParams ,// 添加过滤条件
+        ...this.filterdata, // 添加其他过滤条件
+      })
+    },
 
       getListPrevious() {
         var _this = this
@@ -274,10 +422,14 @@
             })
         }
       },
-      reFresh() {
-        var _this = this
-        _this.getSearchList()
-      },
+    reFresh () {
+      var _this = this
+      this.filterdata = {}
+      this.filterModels = {
+        bound_department: null
+      }
+      _this.getSearchList()
+    },
 
   
       updateProxy() {

+ 20 - 2
templates/src/pages/erp/erpasn.vue

@@ -641,6 +641,8 @@ export default {
       },
       activeSearchField: '', // 当前激活的搜索字段
       activeSearchLabel: '', // 当前激活的搜索字段的标签
+      filterdata: {},
+
       createDate2: '',
       date_range: '',
       proxyDate: '',
@@ -932,7 +934,12 @@ export default {
           ...searchParams,
           page: 1
         })
-
+        this.filterdata = searchParams
+        this.$q.notify({
+          message: `已搜索 ${this.activeSearchLabel} 含有 "${value}" 的结果`,
+          icon: 'search',
+          color: 'positive'
+        })
         // 重置激活的搜索字段
         this.activeSearchField = ''
         this.activeSearchLabel = ''
@@ -949,6 +956,12 @@ export default {
           ...searchParams,
           page: 1
         })
+        this.filterdata = searchParams
+        this.$q.notify({
+          message: `已搜索 ${this.activeSearchLabel} 含有 "${value}" 的结果`,
+          icon: 'search',
+          color: 'positive'
+        })
 
         // 重置激活的搜索字段
         this.activeSearchField = ''
@@ -1304,7 +1317,8 @@ export default {
       this.getList({
         number__icontains: this.filter,
         document_date__range: this.date_range,
-        ...filterParams // 添加过滤条件
+        ...filterParams ,// 添加过滤条件
+        ...this.filterdata, // 添加其他过滤条件
       })
     },
     getfileList () {
@@ -1394,6 +1408,10 @@ export default {
     },
     reFresh () {
       var _this = this
+      this.filterdata = {}
+      this.filterModels = {
+        bound_department: null
+      }
       _this.getSearchList()
     },
 

+ 175 - 21
templates/src/pages/inbound/asn.vue

@@ -16,6 +16,33 @@
         flat
         bordered
       >
+        <template v-slot:header-cell="props">
+          <q-th :props="props" @dblclick="handleHeaderDblClick(props.col)">
+            <!-- 为特定列添加下拉选择器 -->
+            <template v-if="['bound_department'].includes(props.col.name)">
+              <q-select
+                dense
+                outlined
+                v-model="filterModels[props.col.name]"
+                :options="getFilterOptions(props.col.name)"
+                option-label="label"
+                option-value="value"
+                emit-value
+                map-options
+                clearable
+                @input="handleFilterChange"
+                style="min-width: 120px"
+              >
+                <template v-slot:prepend>
+                  <span class="text-caption">{{ props.col.label }}</span>
+                </template>
+              </q-select>
+            </template>
+            <template v-else>
+              {{ props.col.label }}
+            </template>
+          </q-th>
+        </template>
         <template v-slot:top>
           <q-btn-group push>
             <q-btn
@@ -124,7 +151,7 @@
               }}</q-td>
             </template>
 
-            <template v-if="props.row.id === editid">
+            <!-- <template v-if="props.row.id === editid">
               <q-td key="bound_code_type" :props="props">
                 <q-select
                   dense
@@ -179,7 +206,7 @@
                   props.row.bound_bs_type
                 }}</q-td
               >
-            </template>
+            </template> -->
 
             <template v-if="props.row.id === editid">
               <q-td key="bound_desc" :props="props">
@@ -286,7 +313,7 @@
                     >一键分拣</q-tooltip
                   >
                 </q-btn>
-                                <q-btn
+                <q-btn
                   round
                   flat
                   push
@@ -792,7 +819,7 @@
                   class="my-sticky-table scrollable-table"
                   :style="{ 'max-height': '400px' }"
                   :container-style="{ height: 'auto' }"
-                   :pagination="{ rowsPerPage: 0 }"
+                  :pagination="{ rowsPerPage: 0 }"
                 >
                   <template v-slot:body-cell-actions="props">
                     <q-td :props="props">
@@ -890,7 +917,18 @@ export default {
       batch_number_year: '',
       batch_number_month: '',
       batch_number_batch: '',
-
+      // {
+      //   name: 'bound_code_type',
+      //   label: '单据类型',
+      //   field: 'bound_code_type',
+      //   align: 'center'
+      // },
+      // {
+      //   name: 'bound_bs_type',
+      //   label: '业务类型',
+      //   field: 'bound_bs_type',
+      //   align: 'center'
+      // },
       columns: [
         { name: 'detail', label: '详情', field: 'detail', align: 'center' },
         {
@@ -905,18 +943,7 @@ export default {
           field: 'bound_code',
           align: 'center'
         },
-        {
-          name: 'bound_code_type',
-          label: '单据类型',
-          field: 'bound_code_type',
-          align: 'center'
-        },
-        {
-          name: 'bound_bs_type',
-          label: '业务类型',
-          field: 'bound_bs_type',
-          align: 'center'
-        },
+
         {
           name: 'bound_desc',
           label: '出入库类别',
@@ -1024,7 +1051,13 @@ export default {
       },
       currentBarcode: null,
 
-      currentgoods: {}
+      currentgoods: {},
+      filterModels: {
+        bound_department: null
+      },
+      filterdata: {},
+      activeSearchField: '',
+      activeSearchLabel: ''
     }
   },
   computed: {
@@ -1037,6 +1070,110 @@ export default {
     }
   },
   methods: {
+    // 处理过滤变化
+    handleFilterChange () {
+      this.pagination.page = 1
+      this.getSearchList(1)
+    },
+
+    getFilterOptions (columnName) {
+      switch (columnName) {
+        case 'type':
+          return [
+            { label: '生产入库', value: 1 },
+            { label: '采购入库', value: 2 },
+            { label: '其他入库', value: 3 },
+            { label: '调拨入库', value: 4 }
+          ]
+        case 'bound_status':
+          return [
+            { label: '待审核', value: 0 },
+            { label: '确认无误', value: 1 }
+          ]
+        case 'bound_department':
+          return this.bound_department_list
+        default:
+          return []
+      }
+    },
+    handleHeaderDblClick (column) {
+      // 排除不需要搜索的列
+      if (['detail', 'action'].includes(column.name)) return
+
+      this.activeSearchField = column.field
+      this.activeSearchLabel = column.label
+
+      // 弹出搜索对话框
+      this.$q
+        .dialog({
+          title: `搜索${column.label}`,
+          message: `请输入${column.label}的搜索条件`,
+          prompt: {
+            model: '',
+            type: 'text'
+          },
+          cancel: true,
+          persistent: true
+        })
+        .onOk((data) => {
+          // 执行搜索
+          this.executeColumnSearch(column.field, data)
+        })
+        .onCancel(() => {
+          this.activeSearchField = ''
+          this.activeSearchLabel = ''
+        })
+    },
+    // 执行列搜索
+    executeColumnSearch (field, value) {
+      // 构建搜索参数
+      if (
+        field === 'type' ||
+        field === 'audit_status' ||
+        field === 'save_status' ||
+        field === 'bound_status'
+      ) {
+        const searchParams = {
+          [field]: value
+        }
+        // 清除其他搜索条件
+        this.filter = ''
+        this.date_range = ''
+
+        // 执行搜索
+        this.getList({
+          ...searchParams,
+          page: 1
+        })
+
+        // 重置激活的搜索字段
+        this.activeSearchField = ''
+        this.activeSearchLabel = ''
+      } else {
+        const searchParams = {
+          [field + '__icontains']: value
+        }
+        // 清除其他搜索条件
+        this.filter = ''
+        this.date_range = ''
+
+        // 执行搜索
+        this.getList({
+          ...searchParams,
+          page: 1
+        })
+        this.filterdata = searchParams
+        this.$q.notify({
+          message: `已搜索 ${this.activeSearchLabel} 含有 "${value}" 的结果`,
+          icon: 'search',
+          color: 'positive'
+        })
+
+        // // 重置激活的搜索字段
+        this.activeSearchField = ''
+        this.activeSearchLabel = ''
+      }
+    },
     assignGoodsCode () {
       console.log('data', this.newBatchFormData.goods_code)
       console.log(
@@ -1181,12 +1318,23 @@ export default {
     },
 
     // 带搜索条件加载
+    // 修改搜索方法以包含过滤条件
     getSearchList (page = 1) {
       this.current = page
       this.paginationIpt = page
+
+      // 构建过滤参数
+      const filterParams = {}
+      for (const [key, value] of Object.entries(this.filterModels)) {
+        if (value !== null && value !== '') {
+          filterParams[key] = value
+        }
+      }
       this.getList({
-        goods_desc__icontains: this.filter,
-        document_date__range: this.date_range
+        number__icontains: this.filter,
+        document_date__range: this.date_range,
+        ...filterParams ,// 添加过滤条件
+        ...this.filterdata, // 添加其他过滤条件
       })
     },
     downloadlistData () {
@@ -1279,6 +1427,10 @@ export default {
     },
     reFresh () {
       var _this = this
+      this.filterdata = {}
+      this.filterModels = {
+        bound_department: null
+      }
       _this.getSearchList()
     },
 
@@ -1686,7 +1838,9 @@ export default {
     batch_number_batch: function (val) {
       console.log(val)
       this.newBatchFormData.bound_batch_order =
-        this.batch_number_year * 100000 + this.batch_number_month * 1000 + Number(val)
+        this.batch_number_year * 100000 +
+        this.batch_number_month * 1000 +
+        Number(val)
     },
     createDate1 (val) {
       if (val) {

+ 163 - 5
templates/src/pages/inbound/predeliverystock.vue

@@ -16,6 +16,33 @@
         flat
         bordered
       >
+          <template v-slot:header-cell="props">
+          <q-th :props="props" @dblclick="handleHeaderDblClick(props.col)">
+            <!-- 为特定列添加下拉选择器 -->
+            <template v-if="['bound_department'].includes(props.col.name)">
+              <q-select
+                dense
+                outlined
+                v-model="filterModels[props.col.name]"
+                :options="getFilterOptions(props.col.name)"
+                option-label="label"
+                option-value="value"
+                emit-value
+                map-options
+                clearable
+                @input="handleFilterChange"
+                style="min-width: 120px"
+              >
+                <template v-slot:prepend>
+                  <span class="text-caption">{{ props.col.label }}</span>
+                </template>
+              </q-select>
+            </template>
+            <template v-else>
+              {{ props.col.label }}
+            </template>
+          </q-th>
+        </template>
         <template v-slot:top>
           <q-btn-group push>
             <q-btn :label="$t('refresh')" icon="refresh" @click="reFresh()">
@@ -166,6 +193,7 @@
 
 <script>
 import { getauth, postauth, putauth, deleteauth } from 'boot/axios_request'
+import { filter } from 'jszip'
 import { date, LocalStorage } from 'quasar'
 
 export default {
@@ -238,7 +266,13 @@ export default {
       total: 0,
       paginationIpt: 1,
       containers: {},
-      timer: null
+      timer: null,
+            filterModels: {
+        bound_department: null
+      },
+      activeSearchField: '',
+      activeSearchLabel: '',
+      filterdata: {},
     }
   },
   computed: {
@@ -251,6 +285,116 @@ export default {
     }
   },
   methods: {
+       // 处理过滤变化
+    handleFilterChange () {
+      this.pagination.page = 1
+      this.getSearchList(1)
+    },
+
+    getFilterOptions (columnName) {
+      switch (columnName) {
+        case 'type':
+          return [
+            { label: '生产入库', value: 1 },
+            { label: '采购入库', value: 2 },
+            { label: '其他入库', value: 3 },
+            { label: '调拨入库', value: 4 }
+          ]
+        case 'bound_status':
+          return [
+            { label: '待审核', value: 0 },
+            { label: '确认无误', value: 1 }
+          ]
+        case 'bound_department':
+          return this.bound_department_list
+        default:
+          return []
+      }
+    },
+    handleHeaderDblClick (column) {
+      // 排除不需要搜索的列
+      if (['detail', 'action'].includes(column.name)) return
+
+      this.activeSearchField = column.field
+      this.activeSearchLabel = column.label
+
+      // 弹出搜索对话框
+      this.$q
+        .dialog({
+          title: `搜索${column.label}`,
+          message: `请输入${column.label}的搜索条件`,
+          prompt: {
+            model: '',
+            type: 'text'
+          },
+          cancel: true,
+          persistent: true
+        })
+        .onOk((data) => {
+          // 执行搜索
+          this.executeColumnSearch(column.field, data)
+        })
+        .onCancel(() => {
+          this.activeSearchField = ''
+          this.activeSearchLabel = ''
+        })
+    },
+    // 执行列搜索
+    executeColumnSearch (field, value) {
+      // 构建搜索参数
+      if (
+        field === 'type' ||
+        field === 'audit_status' ||
+        field === 'save_status' ||
+        field === 'bound_status'
+      ) {
+        const searchParams = {
+          [field]: value
+        }
+        // 清除其他搜索条件
+        this.filter = ''
+        this.date_range = ''
+
+        // 执行搜索
+        this.getList({
+          ...searchParams,
+          page: 1
+        })
+        this.filterdata = searchParams
+        this.$q.notify({
+          message: `已搜索 ${this.activeSearchLabel} 含有 "${value}" 的结果`,
+          icon: 'search',
+          color: 'positive'
+        })
+
+        // 重置激活的搜索字段
+        this.activeSearchField = ''
+        this.activeSearchLabel = ''
+      } else {
+        const searchParams = {
+          [field + '__icontains']: value
+        }
+        // 清除其他搜索条件
+        this.filter = ''
+        this.date_range = ''
+
+        // 执行搜索
+        this.getList({
+          ...searchParams,
+          page: 1
+        })
+        this.filterdata = searchParams
+        this.$q.notify({
+          message: `已搜索 ${this.activeSearchLabel} 含有 "${value}" 的结果`,
+          icon: 'search',
+          color: 'positive'
+        })
+
+        // 重置激活的搜索字段
+        this.activeSearchField = ''
+        this.activeSearchLabel = ''
+      }
+    },
     class_to_name (class_id) {
       const class_map = {
         1: '整盘',
@@ -341,13 +485,23 @@ export default {
       this.getSearchList(this.current)
     },
 
-    // 带搜索条件加载
-    getSearchList (page = 1) {
+        getSearchList (page = 1) {
       this.current = page
       this.paginationIpt = page
+
+      // 构建过滤参数
+      const filterParams = {}
+      for (const [key, value] of Object.entries(this.filterModels)) {
+        if (value !== null && value !== '') {
+          filterParams[key] = value
+        }
+      }
+
       this.getList({
-        goods_desc__icontains: this.filter,
-        create_time__range: this.date_range
+        number__icontains: this.filter,
+        document_date__range: this.date_range,
+        ...filterParams ,// 添加过滤条件
+        ...this.filterdata, // 添加其他过滤条件
       })
     },
 
@@ -391,6 +545,10 @@ export default {
     },
     reFresh () {
       var _this = this
+      this.filterdata = {}
+      this.filterModels = {
+        bound_department: null
+      }
       _this.getSearchList()
     },
 

+ 6 - 2
templates/src/pages/inbound/shortage.vue

@@ -247,8 +247,12 @@ export default {
     },
     reFresh () {
       var _this = this
-      _this.getList()
-    }
+      this.filterdata = {}
+      this.filterModels = {
+        bound_department: null
+      }
+      _this.getSearchList()
+    },
   },
   created () {
     var _this = this

+ 169 - 10
templates/src/pages/inbound/sortstock.vue

@@ -16,6 +16,33 @@
         flat
         bordered
       >
+       <template v-slot:header-cell="props">
+          <q-th :props="props" @dblclick="handleHeaderDblClick(props.col)">
+            <!-- 为特定列添加下拉选择器 -->
+            <template v-if="['bound_department'].includes(props.col.name)">
+              <q-select
+                dense
+                outlined
+                v-model="filterModels[props.col.name]"
+                :options="getFilterOptions(props.col.name)"
+                option-label="label"
+                option-value="value"
+                emit-value
+                map-options
+                clearable
+                @input="handleFilterChange"
+                style="min-width: 120px"
+              >
+                <template v-slot:prepend>
+                  <span class="text-caption">{{ props.col.label }}</span>
+                </template>
+              </q-select>
+            </template>
+            <template v-else>
+              {{ props.col.label }}
+            </template>
+          </q-th>
+        </template>
         <template v-slot:top>
           <q-btn-group push>
             <q-btn :label="$t('refresh')" icon="refresh" @click="reFresh()">
@@ -346,6 +373,14 @@ export default {
       showInventoryDetails: false,
       select_container_number: 0,
       select_container_code: 0,
+            filterModels: {
+
+        bound_department: null
+      },
+      activeSearchField: '',
+      activeSearchLabel: '',
+      filterdata: {},
+   
     };
   },
   computed: {
@@ -358,6 +393,115 @@ export default {
     },
   },
   methods: {
+        // 处理过滤变化
+    handleFilterChange () {
+      this.pagination.page = 1
+      this.getSearchList(1)
+    },
+
+    getFilterOptions (columnName) {
+      switch (columnName) {
+        case 'type':
+          return [
+            { label: '生产入库', value: 1 },
+            { label: '采购入库', value: 2 },
+            { label: '其他入库', value: 3 },
+            { label: '调拨入库', value: 4 }
+          ]
+        case 'bound_status':
+          return [
+            { label: '待审核', value: 0 },
+            { label: '确认无误', value: 1 }
+          ]
+        case 'bound_department':
+          return this.bound_department_list
+        default:
+          return []
+      }
+    },
+    handleHeaderDblClick (column) {
+      // 排除不需要搜索的列
+      if (['detail', 'action'].includes(column.name)) return
+
+      this.activeSearchField = column.field
+      this.activeSearchLabel = column.label
+
+      // 弹出搜索对话框
+      this.$q
+        .dialog({
+          title: `搜索${column.label}`,
+          message: `请输入${column.label}的搜索条件`,
+          prompt: {
+            model: '',
+            type: 'text'
+          },
+          cancel: true,
+          persistent: true
+        })
+        .onOk((data) => {
+          // 执行搜索
+          this.executeColumnSearch(column.field, data)
+        })
+        .onCancel(() => {
+          this.activeSearchField = ''
+          this.activeSearchLabel = ''
+        })
+    },
+    // 执行列搜索
+    executeColumnSearch (field, value) {
+      // 构建搜索参数
+      if (
+        field === 'type' ||
+        field === 'audit_status' ||
+        field === 'save_status' ||
+        field === 'bound_status'
+      ) {
+        const searchParams = {
+          [field]: value
+        }
+        // 清除其他搜索条件
+        this.filter = ''
+        this.date_range = ''
+
+        // 执行搜索
+        this.getList({
+          ...searchParams,
+          page: 1
+        })
+        this.filterdata = searchParams
+        this.$q.notify({
+          message: `已搜索 ${this.activeSearchLabel} 含有 "${value}" 的结果`,
+          icon: 'search',
+          color: 'positive'
+        })
+
+        // 重置激活的搜索字段
+        this.activeSearchField = ''
+        this.activeSearchLabel = ''
+      } else {
+        const searchParams = {
+          [field + '__icontains']: value
+        }
+        // 清除其他搜索条件
+        this.filter = ''
+        this.date_range = ''
+
+        // 执行搜索
+        this.getList({
+          ...searchParams,
+          page: 1
+        })
+        this.filterdata = searchParams
+        this.$q.notify({
+          message: `已搜索 ${this.activeSearchLabel} 含有 "${value}" 的结果`,
+          icon: 'search',
+          color: 'positive'
+        })
+        // 重置激活的搜索字段
+        this.activeSearchField = ''
+        this.activeSearchLabel = ''
+      }
+    },
     handle_container_detail(container) {
       var _this = this;
       _this.showInventoryDetails = true;
@@ -468,14 +612,25 @@ export default {
       this.getSearchList(this.current);
     },
 
-    // 带搜索条件加载
-    getSearchList(page = 1) {
-      this.current = page;
-      this.paginationIpt = page;
+     // 修改搜索方法以包含过滤条件
+    getSearchList (page = 1) {
+      this.current = page
+      this.paginationIpt = page
+
+      // 构建过滤参数
+      const filterParams = {}
+      for (const [key, value] of Object.entries(this.filterModels)) {
+        if (value !== null && value !== '') {
+          filterParams[key] = value
+        }
+      }
+
       this.getList({
-        goods_desc__icontains: this.filter,
-        create_time__range: this.date_range,
-      });
+        number__icontains: this.filter,
+        document_date__range: this.date_range,
+        ...filterParams , // 添加过滤条件
+        ...this.filterdata, // 添加其他过滤条件
+      })
     },
 
     getListPrevious() {
@@ -516,9 +671,13 @@ export default {
           });
       }
     },
-    reFresh() {
-      var _this = this;
-      _this.getSearchList();
+       reFresh () {
+      var _this = this
+      this.filterdata = {}
+      this.filterModels = {
+        bound_department: null
+      }
+      _this.getSearchList()
     },
 
     updateProxy() {