浏览代码

Merge branch 'master' of http://120.46.159.163:7400/ezhizao/ezhizao_dms_vue

ezhizao_zx 5 月之前
父节点
当前提交
ba9adf5fd8

+ 4 - 0
src/layout/components/TagsView/index.vue

@@ -62,6 +62,7 @@ import usePermissionStore from "@/store/modules/permission";
 import lotStore from "@/store/modules/lot";
 import furnaceStore from "@/store/modules/furnaceInfo";
 import dayworkStore from "@/store/modules/daywork";
+import innerOutsourceStore from "@/store/modules/innerOutsourceOrder";
 
 const visible = ref(false);
 const top = ref(0);
@@ -209,6 +210,9 @@ function closeSelectedTag(view) {
   if ((view.fullPath = "/Production/furnaceInfo")) {
     furnaceStore().setlotQueryParams(null);
   }
+  if ((view.fullPath = "/outsourced/innerOutsource")) {
+    innerOutsourceStore().setInnerOutsourceQueryParams(null);
+  }
   proxy.$tab.closePage(view).then(({ visitedViews }) => {
     if (isActive(view)) {
       toLastView(visitedViews, view);

+ 24 - 0
src/store/modules/innerOutsourceOrder.js

@@ -0,0 +1,24 @@
+
+const innerOutsourceStore = defineStore('innerOutsourceOrder', {
+  state: () => ({
+    innerOutsourceQueryParams: null
+  }),
+  actions: {
+    setInnerOutsourceQueryParams(value) {
+      this.innerOutsourceQueryParams = value;
+    },
+    checkClean(obj) {
+      // console.log(obj.name)
+      if (obj.name == '') {
+        this.innerOutsourceQueryParams = null
+      }
+    },
+    allClean() {
+      this.innerOutsourceQueryParams = null
+    },
+    otherClean(obj) {
+    }
+  }
+})
+
+export default innerOutsourceStore

+ 8 - 0
src/views/business/innerOutsource/index.vue

@@ -134,6 +134,7 @@ import {
   getCarrierInfo
 } from "@/api/business/outsourcedOrder";
 import orderForm from "./form";
+import innerOutsourceStore from "@/store/modules/innerOutsourceOrder";
 import printJS from "print-js";
 import { nextTick } from "vue";
 const { proxy } = getCurrentInstance();
@@ -172,7 +173,12 @@ const queryParams = ref({
 /** 查询外协单主
 带箱方式,是整单的。如果换新箱子,明细中,都需要更换箱子列表 */
 function getList() {
+  console.log(innerOutsourceStore().innerOutsourceQueryParams)
   loading.value = true;
+  if (innerOutsourceStore().innerOutsourceQueryParams != null) {
+    console.log(innerOutsourceStore().innerOutsourceQueryParams)
+     queryParams.value = innerOutsourceStore().innerOutsourceQueryParams;
+    }
   innerOrderList(queryParams.value).then((response) => {
     orderList.value = response.rows;
     total.value = response.total;
@@ -183,6 +189,8 @@ function getList() {
 /** 搜索按钮操作 */
 function handleQuery() {
   queryParams.value.pageNum = 1;
+  const innerOutsourceQueryParams = JSON.parse(JSON.stringify(queryParams.value));
+    innerOutsourceStore().setInnerOutsourceQueryParams(innerOutsourceQueryParams);
   getList();
 }