Переглянути джерело

批次查询不清空搜索条件刷新

wangxin 11 місяців тому
батько
коміт
4b31f83c96

+ 129 - 95
src/layout/components/TagsView/index.vue

@@ -1,7 +1,11 @@
 <template>
   <div id="tags-view-container" class="tags-view-container">
     <div class="tags-views-container-bg"></div>
-    <scroll-pane ref="scrollPaneRef" class="tags-view-wrapper" @scroll="handleScroll">
+    <scroll-pane
+      ref="scrollPaneRef"
+      class="tags-view-wrapper"
+      @scroll="handleScroll"
+    >
       <router-link
         v-for="tag in visitedViews"
         :key="tag.path"
@@ -15,68 +19,88 @@
       >
         {{ tag.title }}
         <span v-if="!isAffix(tag)" @click.prevent.stop="closeSelectedTag(tag)">
-          <close class="el-icon-close" style="width: 1em; height: 1em; vertical-align: middle" />
+          <close
+            class="el-icon-close"
+            style="width: 1em; height: 1em; vertical-align: middle"
+          />
         </span>
       </router-link>
     </scroll-pane>
-    <ul v-show="visible" :style="{ left: left + 'px', top: top + 'px' }" class="contextmenu">
-      <li @click="refreshSelectedTag(selectedTag)"><refresh-right style="width: 1em; height: 1em" /> 刷新页面</li>
-      <li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)"><close style="width: 1em; height: 1em" /> 关闭当前</li>
-      <li @click="closeOthersTags"><circle-close style="width: 1em; height: 1em" /> 关闭其他</li>
-      <li v-if="!isFirstView()" @click="closeLeftTags"><back style="width: 1em; height: 1em" /> 关闭左侧</li>
-      <li v-if="!isLastView()" @click="closeRightTags"><right style="width: 1em; height: 1em" /> 关闭右侧</li>
-      <li @click="closeAllTags(selectedTag)"><circle-close style="width: 1em; height: 1em" /> 全部关闭</li>
+    <ul
+      v-show="visible"
+      :style="{ left: left + 'px', top: top + 'px' }"
+      class="contextmenu"
+    >
+      <li @click="refreshSelectedTag(selectedTag)">
+        <refresh-right style="width: 1em; height: 1em" /> 刷新页面
+      </li>
+      <li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)">
+        <close style="width: 1em; height: 1em" /> 关闭当前
+      </li>
+      <li @click="closeOthersTags">
+        <circle-close style="width: 1em; height: 1em" /> 关闭其他
+      </li>
+      <li v-if="!isFirstView()" @click="closeLeftTags">
+        <back style="width: 1em; height: 1em" /> 关闭左侧
+      </li>
+      <li v-if="!isLastView()" @click="closeRightTags">
+        <right style="width: 1em; height: 1em" /> 关闭右侧
+      </li>
+      <li @click="closeAllTags(selectedTag)">
+        <circle-close style="width: 1em; height: 1em" /> 全部关闭
+      </li>
     </ul>
   </div>
 </template>
 
 <script setup>
-import ScrollPane from './ScrollPane'
-import { getNormalPath } from '@/utils/ruoyi'
-import useTagsViewStore from '@/store/modules/tagsView'
-import useSettingsStore from '@/store/modules/settings'
-import usePermissionStore from '@/store/modules/permission'
+import ScrollPane from "./ScrollPane";
+import { getNormalPath } from "@/utils/ruoyi";
+import useTagsViewStore from "@/store/modules/tagsView";
+import useSettingsStore from "@/store/modules/settings";
+import usePermissionStore from "@/store/modules/permission";
+import lotStore from "@/store/modules/lot";
 
-const visible = ref(false)
-const top = ref(0)
-const left = ref(0)
-const selectedTag = ref({})
-const affixTags = ref([])
-const scrollPaneRef = ref(null)
+const visible = ref(false);
+const top = ref(0);
+const left = ref(0);
+const selectedTag = ref({});
+const affixTags = ref([]);
+const scrollPaneRef = ref(null);
 
-const { proxy } = getCurrentInstance()
-const route = useRoute()
-const router = useRouter()
+const { proxy } = getCurrentInstance();
+const route = useRoute();
+const router = useRouter();
 
-const visitedViews = computed(() => useTagsViewStore().visitedViews)
-const routes = computed(() => usePermissionStore().routes)
-const theme = computed(() => useSettingsStore().theme)
+const visitedViews = computed(() => useTagsViewStore().visitedViews);
+const routes = computed(() => usePermissionStore().routes);
+const theme = computed(() => useSettingsStore().theme);
 
 watch(route, () => {
-  addTags()
-  moveToCurrentTag()
-})
+  addTags();
+  moveToCurrentTag();
+});
 watch(visible, (value) => {
   if (value) {
-    document.body.addEventListener('click', closeMenu)
+    document.body.addEventListener("click", closeMenu);
   } else {
-    document.body.removeEventListener('click', closeMenu)
+    document.body.removeEventListener("click", closeMenu);
   }
-})
+});
 onMounted(() => {
-  initTags()
-  addTags()
-})
+  initTags();
+  addTags();
+});
 
 function isActive(r) {
-  return r.path === route.path
+  return r.path === route.path;
 }
 function activeStyle(tag) {
-  if (!isActive(tag)) return {}
+  if (!isActive(tag)) return {};
   return {
-    'background-color': '#fff',
-    'border-color': '#496bdc'
-  }
+    "background-color": "#fff",
+    "border-color": "#496bdc",
+  };
   /*
   // 原程序,可以通过设置进行颜色调整
   return {
@@ -86,154 +110,164 @@ function activeStyle(tag) {
   */
 }
 function isAffix(tag) {
-  return tag.meta && tag.meta.affix
+  return tag.meta && tag.meta.affix;
 }
 function isFirstView() {
   try {
-    return selectedTag.value.fullPath === visitedViews.value[1].fullPath || selectedTag.value.fullPath === '/index'
+    return (
+      selectedTag.value.fullPath === visitedViews.value[1].fullPath ||
+      selectedTag.value.fullPath === "/index"
+    );
   } catch (err) {
-    return false
+    return false;
   }
 }
 function isLastView() {
   try {
-    return selectedTag.value.fullPath === visitedViews.value[visitedViews.value.length - 1].fullPath
+    return (
+      selectedTag.value.fullPath ===
+      visitedViews.value[visitedViews.value.length - 1].fullPath
+    );
   } catch (err) {
-    return false
+    return false;
   }
 }
-function filterAffixTags(routes, basePath = '') {
-  let tags = []
+function filterAffixTags(routes, basePath = "") {
+  let tags = [];
   routes.forEach((route) => {
     if (route.meta && route.meta.affix) {
-      const tagPath = getNormalPath(basePath + '/' + route.path)
+      const tagPath = getNormalPath(basePath + "/" + route.path);
       tags.push({
         fullPath: tagPath,
         path: tagPath,
         name: route.name,
-        meta: { ...route.meta }
-      })
+        meta: { ...route.meta },
+      });
     }
     if (route.children) {
-      const tempTags = filterAffixTags(route.children, route.path)
+      const tempTags = filterAffixTags(route.children, route.path);
       if (tempTags.length >= 1) {
-        tags = [...tags, ...tempTags]
+        tags = [...tags, ...tempTags];
       }
     }
-  })
-  return tags
+  });
+  return tags;
 }
 function initTags() {
-  const res = filterAffixTags(routes.value)
-  affixTags.value = res
+  const res = filterAffixTags(routes.value);
+  affixTags.value = res;
   for (const tag of res) {
     // Must have tag name
     if (tag.name) {
-      useTagsViewStore().addVisitedView(tag)
+      useTagsViewStore().addVisitedView(tag);
     }
   }
 }
 function addTags() {
-  const { name } = route
+  const { name } = route;
   if (name) {
-    useTagsViewStore().addView(route)
+    useTagsViewStore().addView(route);
     if (route.meta.link) {
-      useTagsViewStore().addIframeView(route)
+      useTagsViewStore().addIframeView(route);
     }
   }
-  return false
+  return false;
 }
 function moveToCurrentTag() {
   nextTick(() => {
     for (const r of visitedViews.value) {
       if (r.path === route.path) {
-        scrollPaneRef.value.moveToTarget(r)
+        scrollPaneRef.value.moveToTarget(r);
         // when query is different then update
         if (r.fullPath !== route.fullPath) {
-          useTagsViewStore().updateVisitedView(route)
+          useTagsViewStore().updateVisitedView(route);
         }
       }
     }
-  })
+  });
 }
 function refreshSelectedTag(view) {
-  proxy.$tab.refreshPage(view)
+  proxy.$tab.refreshPage(view);
   if (route.meta.link) {
-    useTagsViewStore().delIframeView(route)
+    useTagsViewStore().delIframeView(route);
   }
 }
 function closeSelectedTag(view) {
+  //关闭批次查询页面时清空批次查询页面store
+  if ((view.fullPath = "/Production/lot/:productionPlanNo/:lineNumber")) {
+    lotStore().setlotQueryParams(null);
+  }
   proxy.$tab.closePage(view).then(({ visitedViews }) => {
     if (isActive(view)) {
-      toLastView(visitedViews, view)
+      toLastView(visitedViews, view);
     }
-  })
+  });
 }
 function closeRightTags() {
   proxy.$tab.closeRightPage(selectedTag.value).then((visitedViews) => {
     if (!visitedViews.find((i) => i.fullPath === route.fullPath)) {
-      toLastView(visitedViews)
+      toLastView(visitedViews);
     }
-  })
+  });
 }
 function closeLeftTags() {
   proxy.$tab.closeLeftPage(selectedTag.value).then((visitedViews) => {
     if (!visitedViews.find((i) => i.fullPath === route.fullPath)) {
-      toLastView(visitedViews)
+      toLastView(visitedViews);
     }
-  })
+  });
 }
 function closeOthersTags() {
-  router.push(selectedTag.value).catch(() => {})
+  router.push(selectedTag.value).catch(() => {});
   proxy.$tab.closeOtherPage(selectedTag.value).then(() => {
-    moveToCurrentTag()
-  })
+    moveToCurrentTag();
+  });
 }
 function closeAllTags(view) {
   proxy.$tab.closeAllPage().then(({ visitedViews }) => {
     if (affixTags.value.some((tag) => tag.path === route.path)) {
-      return
+      return;
     }
-    toLastView(visitedViews, view)
-  })
+    toLastView(visitedViews, view);
+  });
 }
 function toLastView(visitedViews, view) {
-  const latestView = visitedViews.slice(-1)[0]
+  const latestView = visitedViews.slice(-1)[0];
   if (latestView) {
-    router.push(latestView.fullPath)
+    router.push(latestView.fullPath);
   } else {
     // now the default is to redirect to the home page if there is no tags-view,
     // you can adjust it according to your needs.
-    if (view.name === 'Dashboard') {
+    if (view.name === "Dashboard") {
       // to reload home page
-      router.replace({ path: '/redirect' + view.fullPath })
+      router.replace({ path: "/redirect" + view.fullPath });
     } else {
-      router.push('/')
+      router.push("/");
     }
   }
 }
 function openMenu(tag, e) {
-  const menuMinWidth = 105
-  const offsetLeft = proxy.$el.getBoundingClientRect().left // container margin left
-  const offsetWidth = proxy.$el.offsetWidth // container width
-  const maxLeft = offsetWidth - menuMinWidth // left boundary
-  const l = e.clientX - offsetLeft + 15 // 15: margin right
+  const menuMinWidth = 105;
+  const offsetLeft = proxy.$el.getBoundingClientRect().left; // container margin left
+  const offsetWidth = proxy.$el.offsetWidth; // container width
+  const maxLeft = offsetWidth - menuMinWidth; // left boundary
+  const l = e.clientX - offsetLeft + 15; // 15: margin right
 
   if (l > maxLeft) {
-    left.value = maxLeft
+    left.value = maxLeft;
   } else {
-    left.value = l
+    left.value = l;
   }
 
-  top.value = 34 //e.clientY
-  visible.value = true
-  selectedTag.value = tag
+  top.value = 34; //e.clientY
+  visible.value = true;
+  selectedTag.value = tag;
 }
 function closeMenu() {
-  visible.value = false
+  visible.value = false;
 }
 function handleScroll() {
-  closeMenu()
+  closeMenu();
 }
 </script>
 

+ 13 - 0
src/store/modules/lot.js

@@ -0,0 +1,13 @@
+
+const lotStore = defineStore('lot', {
+  state: () => ({
+      lotQueryParams:null
+  }),
+  actions: {
+    setlotQueryParams(value) { 
+      this.lotQueryParams = value;
+    }
+  }
+})
+
+export default lotStore

+ 250 - 59
src/views/business/lot/index.vue

@@ -1,33 +1,65 @@
 <template>
   <div class="page-container column-container">
     <!-- 搜索区 -->
-    <el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true">
+    <el-form
+      class="list-search-container"
+      :model="queryParams"
+      ref="queryRef"
+      :inline="true"
+    >
       <el-form-item label="产品描述:">
-        <el-input placeholder="请输入产品描述" v-model.trim="queryParams.productDescription" style="width: 150px" clearable
-          @keyup.enter="handleQuerydaywork" @keydown.enter.prevent />
+        <el-input
+          placeholder="请输入产品描述"
+          v-model.trim="queryParams.productDescription"
+          style="width: 150px"
+          clearable
+          @keyup.enter="handleQuerydaywork"
+          @keydown.enter.prevent
+        />
       </el-form-item>
       <el-form-item label="生产计划单号:">
-        <el-input placeholder="请输入生产计划单号" v-model.trim="queryParams.productionPlanNo" style="width: 120px" clearable
-          @keyup.enter="handleQuerydaywork" @keydown.enter.prevent />
+        <el-input
+          placeholder="请输入生产计划单号"
+          v-model.trim="queryParams.productionPlanNo"
+          style="width: 120px"
+          clearable
+          @keyup.enter="handleQuerydaywork"
+          @keydown.enter.prevent
+        />
       </el-form-item>
       <!-- <el-form-item label="序号:">
         <el-input placeholder="请输入序号" v-model.trim="queryParams.lineNumber" style="width: 130px" clearable
           @keyup.enter="handleQuerydaywork" @keydown.enter.prevent />
       </el-form-item> -->
       <el-form-item label="批次号:">
-        <el-input placeholder="请输入批次号" v-model.trim="queryParams.lotCode" style="width: 130px" clearable
-          @keyup.enter="handleQuerydaywork" @keydown.enter.prevent />
+        <el-input
+          placeholder="请输入批次号"
+          v-model.trim="queryParams.lotCode"
+          style="width: 130px"
+          clearable
+          @keyup.enter="handleQuerydaywork"
+          @keydown.enter.prevent
+        />
       </el-form-item>
       <el-form-item label="工段:">
         <!-- <el-select-v2 v-model="queryParams.deptId" :options="deptList" placeholder="请选择工段" style="width: 140px" /> -->
-        <el-autocomplete v-model.trim="deptName" clearable :fetch-suggestions="queryDeptSearchAsync" placeholder="请选择工段"
-          @select="handleDeptSelect" style="width: 140px" @clear="handleClearDept">
+        <el-autocomplete
+          v-model.trim="deptName"
+          clearable
+          :fetch-suggestions="queryDeptSearchAsync"
+          placeholder="请选择工段"
+          @select="handleDeptSelect"
+          style="width: 140px"
+          @clear="handleClearDept"
+        >
           <template #default="{ item }">
-            <div style="
+            <div
+              style="
                 display: flex;
                 flex-direction: row;
                 justify-content: space-between;
-              ">
+              "
+            >
               <div class="name" style="font-size: 12px">
                 {{ item.deptName }}
               </div>
@@ -36,30 +68,67 @@
         </el-autocomplete>
       </el-form-item>
       <el-form-item label="标识:">
-        <el-select style="width: 160px" multiple v-model="queryParams.flags" collapse-tags collapse-tags-tooltip
-          clearable placeholder="请选择标识" @change="handleFlagChange">
-          <el-option v-for="item in is_identification" :key="item.value" :label="item.label"
-            :value="item.value"></el-option>
+        <el-select
+          style="width: 160px"
+          multiple
+          v-model="queryParams.flags"
+          collapse-tags
+          collapse-tags-tooltip
+          clearable
+          placeholder="请选择标识"
+          @change="handleFlagChange"
+        >
+          <el-option
+            v-for="item in is_identification"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          ></el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="时间:">
-        <el-date-picker v-model="queryParams.startTime" type="date" value-format="YYYY-MM-DD" :editable="false"
-          :clearable="false" placeholder="请选择开始时间" style="width: 130px" @change="handleDateChange" />
+        <el-date-picker
+          v-model="queryParams.startTime"
+          type="date"
+          value-format="YYYY-MM-DD"
+          :editable="false"
+          :clearable="false"
+          placeholder="请选择开始时间"
+          style="width: 130px"
+          @change="handleDateChange"
+        />
         <span>To</span>
-        <el-date-picker v-model="queryParams.endTime" type="date" value-format="YYYY-MM-DD" :editable="false"
-          :clearable="false" placeholder="请选择结束时间" style="width: 130px" @change="handleDateChange" />
+        <el-date-picker
+          v-model="queryParams.endTime"
+          type="date"
+          value-format="YYYY-MM-DD"
+          :editable="false"
+          :clearable="false"
+          placeholder="请选择结束时间"
+          style="width: 130px"
+          @change="handleDateChange"
+        />
       </el-form-item>
       <el-form-item label="工序:">
         <!-- <el-select-v2 v-model="processAlias" :options="processList" placeholder="请选择工序" style="width: 140px"
           @change="handleProcessChange" /> -->
-        <el-autocomplete v-model.trim="processAlias" clearable :fetch-suggestions="queryProcessSearchAsync"
-          placeholder="请选择工序" @select="handleProcessSelect" style="width: 140px" @clear="handleClearProcess">
+        <el-autocomplete
+          v-model.trim="processAlias"
+          clearable
+          :fetch-suggestions="queryProcessSearchAsync"
+          placeholder="请选择工序"
+          @select="handleProcessSelect"
+          style="width: 140px"
+          @clear="handleClearProcess"
+        >
           <template #default="{ item }">
-            <div style="
+            <div
+              style="
                 display: flex;
                 flex-direction: row;
                 justify-content: space-between;
-              ">
+              "
+            >
               <div class="name" style="font-size: 12px">
                 {{ item.label }}
               </div>
@@ -68,68 +137,178 @@
         </el-autocomplete>
       </el-form-item>
       <el-form-item>
-        <el-button type="info" icon="Search" @click="handleQuerydaywork">搜索</el-button>
+        <el-button type="info" icon="Search" @click="handleQuerydaywork"
+          >搜索</el-button
+        >
       </el-form-item>
       <div style="margin-top: 20px">
-        <el-button type="primary" @click="handleWasteRecycling"
-          :disabled="selections.length == 0 || selections.length > 1 || checkRecycle()"
-          v-hasPermi="['business:lot:wasteRecycling']">添加废品回用</el-button>
-        <el-button :disabled="selections.length !== 1 || checkRecycle()" type="primary" @click="showInBatch"
-          v-hasPermi="['business:lot:inBatch']">分批</el-button>
-        <el-button type="primary" :disabled="once || checkRecycle()" @click="handleOnceSingleChange"
-          v-hasPermi="['business:lot:onceSingleChange']">单批单改</el-button>
-        <el-button type="primary" :disabled="multi || checkRecycle()" @click="handleMultiSingleChange"
-          v-hasPermi="['business:lot:multiSingleChange']">多批单改</el-button>
+        <el-button
+          type="primary"
+          @click="handleWasteRecycling"
+          :disabled="
+            selections.length == 0 || selections.length > 1 || checkRecycle()
+          "
+          v-hasPermi="['business:lot:wasteRecycling']"
+          >添加废品回用</el-button
+        >
+        <el-button
+          :disabled="selections.length !== 1 || checkRecycle()"
+          type="primary"
+          @click="showInBatch"
+          v-hasPermi="['business:lot:inBatch']"
+          >分批</el-button
+        >
+        <el-button
+          type="primary"
+          :disabled="once || checkRecycle()"
+          @click="handleOnceSingleChange"
+          v-hasPermi="['business:lot:onceSingleChange']"
+          >单批单改</el-button
+        >
+        <el-button
+          type="primary"
+          :disabled="multi || checkRecycle()"
+          @click="handleMultiSingleChange"
+          v-hasPermi="['business:lot:multiSingleChange']"
+          >多批单改</el-button
+        >
       </div>
     </el-form>
     <!-- 列表区 -->
     <div class="el-table-container">
       <div class="el-table-inner-container">
-        <el-table ref="dayworkTable" v-loading="loading" row-key="lotId" @selection-change="handleSelectionChange"
-          height="100%" :data="lotList">
+        <el-table
+          ref="dayworkTable"
+          v-loading="loading"
+          row-key="lotId"
+          @selection-change="handleSelectionChange"
+          height="100%"
+          :data="lotList"
+        >
           <el-table-column type="selection" width="40" align="center" />
-          <el-table-column label="客户简称" prop="companyAlias" width="120" align="center" />
-          <el-table-column label="生产计划单号" width="100" prop="productionPlanNo" align="center" />
-          <el-table-column label="序号" width="60" prop="lineNumber" align="center" />
+          <el-table-column
+            label="客户简称"
+            prop="companyAlias"
+            width="120"
+            align="center"
+          />
+          <el-table-column
+            label="生产计划单号"
+            width="100"
+            prop="productionPlanNo"
+            align="center"
+          />
+          <el-table-column
+            label="序号"
+            width="60"
+            prop="lineNumber"
+            align="center"
+          />
 
-          <el-table-column label="批次号" prop="lotCode" align="center" width="150px">
+          <el-table-column
+            label="批次号"
+            prop="lotCode"
+            align="center"
+            width="150px"
+          >
             <template #default="scope">
-              <el-button link type="primary" @click="handleColumnClick(scope.row.lotCode)"><span>{{ scope.row.lotCode
-                  }}</span></el-button>
+              <el-button
+                link
+                type="primary"
+                @click="handleColumnClick(scope.row.lotCode)"
+                ><span>{{ scope.row.lotCode }}</span></el-button
+              >
             </template>
           </el-table-column>
-          <el-table-column label="产品描述" prop="productDescription" align="center" />
-          <el-table-column label="图纸版本" width="80" prop="technologyVersion" align="center" />
-          <el-table-column label="投产量" width="100" prop="productionQuantity" align="center" />
-          <el-table-column label="下达日期" prop="createTime" width="100" align="center">
+          <el-table-column
+            label="产品描述"
+            prop="productDescription"
+            align="center"
+          />
+          <el-table-column
+            label="图纸版本"
+            width="80"
+            prop="technologyVersion"
+            align="center"
+          />
+          <el-table-column
+            label="投产量"
+            width="100"
+            prop="productionQuantity"
+            align="center"
+          />
+          <el-table-column
+            label="下达日期"
+            prop="createTime"
+            width="100"
+            align="center"
+          >
             <template #default="scope">
               <span>{{
-      proxy.moment(scope.row.createTime).format("YYYY-MM-DD")
-    }}</span>
+                proxy.moment(scope.row.createTime).format("YYYY-MM-DD")
+              }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="当前工段" width="100" prop="deptName" align="center" />
-          <el-table-column label="当前工序" width="120" prop="processAlias" align="center" />
+          <el-table-column
+            label="当前工段"
+            width="100"
+            prop="deptName"
+            align="center"
+          />
+          <el-table-column
+            label="当前工序"
+            width="120"
+            prop="processAlias"
+            align="center"
+          />
           <el-table-column label="标识" width="300" align="center">
             <template #default="scope">
-              <el-tag v-if="scope.row.isWaste == 1" class="spacing" type="danger">{{ "批废" }}</el-tag>
-              <el-tag v-if="scope.row.isAmend == 1" class="spacing" type="danger">{{ "工艺修改" }}</el-tag>
-              <el-tag v-if="scope.row.isWasteRecycling == 1" class="spacing" type="primary">{{ "废品回用" }}</el-tag>
+              <el-tag
+                v-if="scope.row.isWaste == 1"
+                class="spacing"
+                type="danger"
+                >{{ "批废" }}</el-tag
+              >
+              <el-tag
+                v-if="scope.row.isAmend == 1"
+                class="spacing"
+                type="danger"
+                >{{ "工艺修改" }}</el-tag
+              >
+              <el-tag
+                v-if="scope.row.isWasteRecycling == 1"
+                class="spacing"
+                type="primary"
+                >{{ "废品回用" }}</el-tag
+              >
             </template>
           </el-table-column>
           <el-table-column label="母批号" prop="fromCode" align="center">
             <template #default="scope">
-              <el-button link type="primary" width="150px" @click="handleColumnClick(scope.row.fromCode)"><span>{{
-      scope.row.fromCode }}</span></el-button>
+              <el-button
+                link
+                type="primary"
+                width="150px"
+                @click="handleColumnClick(scope.row.fromCode)"
+                ><span>{{ scope.row.fromCode }}</span></el-button
+              >
             </template>
           </el-table-column>
         </el-table>
       </div>
     </div>
     <!-- 分页 -->
-    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize" @pagination="getLot" />
-    <waste-recycling-dialog ref="wasteRecyclingDialogRef" @handleSaveSuccess="getLot()"></waste-recycling-dialog>
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize"
+      @pagination="getLot"
+    />
+    <waste-recycling-dialog
+      ref="wasteRecyclingDialogRef"
+      @handleSaveSuccess="getLot()"
+    ></waste-recycling-dialog>
     <InBatchesDialog ref="inBatchesDialogRef" :getList="handleQuerydaywork" />
     <once-change ref="onceChangeRef" @handleSaveSuccess="getLot()" />
     <multi-change ref="multiChangeRef" @handleSaveSuccess="getLot()" />
@@ -145,6 +324,8 @@ import multiChange from "@/views/business/reviseBath/multiSingleChangeDialog.vue
 import onceChange from "@/views/business/reviseBath/onceSingleChangeDialog.vue";
 import InBatchesDialog from "@/views/business/lot/InBatchesDialog.vue";
 import { ref } from "vue";
+import lotStore from "@/store/modules/lot";
+
 const route = useRoute();
 const { proxy } = getCurrentInstance();
 /** 字典数组区 */
@@ -162,6 +343,7 @@ const visible = ref(false);
 const selections = ref([]);
 const processList = ref([]);
 const deptList = ref([]);
+
 /** 查询对象 */
 const queryParams = ref({
   pageNum: 1,
@@ -180,6 +362,7 @@ const queryDeptParams = ref({
 /***********************  方法区  ****************************/
 /** 打开抽屉 */
 function getDept() {
+  console.log("--------------------------------");
   getNowDate();
   getPassDate();
   //获取工段信息
@@ -260,6 +443,12 @@ function handleOnceSingleChange() {
 
 /**获取生产计划列表 */
 function getLot() {
+  console.log("storeLot", lotStore().lotQueryParams);
+
+  if (lotStore().lotQueryParams != null) {
+    queryParams.value = lotStore().lotQueryParams;
+  }
+
   loading.value = true;
   getLotList(queryParams.value).then((res) => {
     if (res.code == 200) {
@@ -336,6 +525,7 @@ function handleQuerydaywork() {
   ) {
     proxy.$modal.msgError("结束时间不能小于开始时间");
   } else {
+    lotStore().setlotQueryParams(queryParams.value);
     getLot();
   }
 }
@@ -433,8 +623,9 @@ const handleFlagChange = (selection) => {
 };
 const checkRecycle = () => {
   // 判断是否是废品回用,废品回用的无论分批还是单批单改多批单改废品回用都不能做
-  return selections.value.some(v => v.isWasteRecycling == 1)
-}
+  return selections.value.some((v) => v.isWasteRecycling == 1);
+};
+
 onMounted(() => {
   getDept();
 });