Browse Source

物料采集新增窗口分页数据展示不正确,筛选单.

jiaxiaoqiang 6 tháng trước cách đây
mục cha
commit
ac0430c6c4

+ 6 - 7
src/components/CommonTable/configs/tableConfig.ts

@@ -453,9 +453,13 @@ export const tableConfig = {
       },
       {
         label: "物料编码",
+        search: true,
+        prop: "bomMaterialCode",
+      },
+      {
+        label: "物料编码",
         prop: "materialCode",
         hide: true,
-        search: true,
       },
 
       {
@@ -463,14 +467,9 @@ export const tableConfig = {
         prop: "materialName",
         overHidden: true,
         hide: true,
-        search: true,
       },
 
       {
-        label: "物料编码",
-        prop: "bomMaterialCode",
-      },
-      {
         label: "物料名称",
         prop: "bomMaterialName",
         overHidden: true,
@@ -491,7 +490,7 @@ export const tableConfig = {
         type: "number",
         precision: 2,
       },
-      { label: "物料规格", prop: "spec", search: true },
+      { label: "物料规格", prop: "spec" },
     ],
   },
 

+ 3 - 1
src/components/CommonTable/index.vue

@@ -185,6 +185,8 @@ const rowClick = (row) => {
 };
 
 const handleClose = () => {
+  // 在这里可以清空打开的commonTable的搜索条件
+  search.value.bomMaterialCode = "";
   isShowTable.value = false;
 };
 
@@ -200,7 +202,7 @@ const onSelected = () => {
     }
   }
 
-  isShowTable.value = false;
+  handleClose();
 };
 
 defineExpose({ startSelect, refreshDictData, mergeOption });

+ 1 - 0
src/components/Search/index.vue

@@ -63,6 +63,7 @@ const reset = () => {
   for (let key in searchForm.value) {
     searchForm.value[key] = "";
   }
+  emit("dataList");
 };
 const setSearchFrom = () => {
   props.searchOptions.forEach((option) => {});

+ 1 - 1
src/hooks/userCrud.ts

@@ -110,8 +110,8 @@ export const useCrud = (config?: UseCrudConfig) => {
           data: {
             pageNo: page.value.currentPage,
             pageSize: page.value.pageSize,
-            ...search.value,
             ...(commonConfig.value?.params ?? {}),
+            ...search.value,
           },
         });
         if (res?.data) {

+ 1 - 0
src/views/plan/filtersheet/index.vue

@@ -34,6 +34,7 @@
             link
             type="primary"
             size="small"
+            v-if="row?.state != '3'"
             v-hasPerm="[ButtonPermKeys.PLAN.BTNS.filtersheet_del]"
             @click="deleteSheet(row.id)"
             >删除</el-button