guoyujia 8 months ago
parent
commit
42e0454dc8

+ 0 - 16
src/router/index.js

@@ -261,22 +261,6 @@ export const dynamicRoutes = [
         }
       }
     ]
-  },
-  {
-    path: '/basic',
-    component: Layout,
-    hidden: true,
-    permissions: ['business:reject:query'],
-    children: [
-      {
-        path: 'reject/:categoryId(.*)/:carrierCode(.*)',
-        component: () => import('@/views/business/reject/index'),
-        name: 'carrierInfo',
-        meta: {
-          title: '废弃信息'
-        }
-      }
-    ]
   }
 ]
 

+ 17 - 0
src/store/modules/carrier.js

@@ -0,0 +1,17 @@
+
+const carrierStore = defineStore('carrier', {
+  state: () => ({
+      categoryId:null,
+      carrierCode:null
+  }),
+  actions: {
+    setCategoryIdQueryParams(value) { 
+      this.categoryId = value;
+    },
+    setCarrierCodeQueryParams(value) { 
+      this.carrierCode = value;
+    }
+  }
+})
+
+export default carrierStore

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

@@ -0,0 +1,13 @@
+
+const productionPlanDetailStore = defineStore('productionPlanDetail', {
+  state: () => ({
+      productionPlanNo:null
+  }),
+  actions: {
+    setProductionPlanDetailQueryParams(value) { 
+      this.productionPlanNo = value;
+    }
+  }
+})
+
+export default productionPlanDetailStore

+ 10 - 9
src/views/business/carrier/index.vue

@@ -175,6 +175,7 @@
         style="width: 100mm; height: 100mm">
       </el-image>
     </div>
+    
   </div>
 </template>
 
@@ -198,6 +199,7 @@ import router from "@/router";
 import { nextTick } from "vue";
 import JSZip from "jszip";
 import { saveAs } from "file-saver";
+import carrierStore from "@/store/modules/carrier";
 const { proxy } = getCurrentInstance();
 const { carrier_status } = proxy.useDict("carrier_status");
 const { is_allow_more } = proxy.useDict("is_allow_more");
@@ -211,6 +213,7 @@ const categoryLoading = ref(false);
 const carrierLoading = ref(false);
 const carrierTotal = ref(0);
 const selections = ref([]);
+const route = useRoute();
 const printStatus = ref([{
   label: '未打印',
   value: 0
@@ -259,14 +262,9 @@ const handleMultipleCategoryDialog = () => {
 };
 //查看历史记录
 function handleCheckHidtory(row) {
-  console.log(row)
-  router.push({
-    name: "carrierInfo",
-    params: {
-      categoryId: row.categoryId,
-      carrierCode: row.code,
-    },
-  });
+  carrierStore().setCategoryIdQueryParams(row.categoryId)
+  carrierStore().setCarrierCodeQueryParams(row.code)
+  router.push({ path: "/basic/reject" });
 }
 /**载具类别点击事件 */
 const handleCurrentCategoryChange = (row) => {
@@ -438,6 +436,7 @@ const handleBatchPrintQrCode = async () => {
   //   }
 
   // });
+  if(selections.value.length >0){
   const res = await whether(selections.value)
   if (res.code == 200) {
     const imageGroup = document.getElementById("image-group");
@@ -452,7 +451,7 @@ const handleBatchPrintQrCode = async () => {
     }
     // window.print();
   }
-
+  }
 };
 
 const handleBatchPrintPdf = () => {
@@ -483,6 +482,7 @@ const handleBatchPrintPdf = () => {
 // }
 /**批量下载二维码 */
 async function handleBatchDownloadQrCode() {
+  if(selections.value.length >0){
   console.log(selections.value);
 
   whether(selections.value).then(async (res) => {
@@ -509,6 +509,7 @@ async function handleBatchDownloadQrCode() {
     }
   });
 }
+}
 
 onMounted(() => {
   getCategories();

+ 14 - 6
src/views/business/consult/index.vue

@@ -21,15 +21,19 @@
       </el-form-item>
       <el-form-item label="咨询类别:">
         <el-select
-          v-model="queryParams.isProcessInspection"
+          v-model="queryParams.type"
           clearable
           placeholder="请选择类别"
           style="width: 130px"
         >
           <el-option label="全部" value="" />
           <el-option label="分选" value="0" />
-          <el-option label="序检" value="1" />
-          <el-option label="外协序检" value="2" />
+          <el-option label="巡检" value="1" />
+          <el-option label="交检" value="2" />
+          <el-option label="首件检" value="3" />
+          <el-option label="仪器室" value="4" />
+          <el-option label="外协检" value="5" />
+          <el-option label="出厂检" value="6" />
         </el-select>
       </el-form-item>
       <el-form-item label="计划单号/批次号:">
@@ -93,9 +97,13 @@
           </el-table-column>
           <el-table-column label="咨询类别" align="center" width="80">
             <template #default="scope">
-              <span v-if="scope.row.processInspectionId == 0 && scope.row.isOutsourcedInspection == 0">分选</span>
-              <span v-if="scope.row.processInspectionId !=0 && scope.row.isOutsourcedInspection==0">序检</span>
-              <span v-if="scope.row.isOutsourcedInspection==1">外协序检</span>
+              <span v-if="scope.row.processInspectionId == 0">分选</span>
+              <span v-if="scope.row.type == 'patrolInspection'">巡检</span>
+              <span v-if="scope.row.type == 'deliveryInspection'">交检</span>
+              <span v-if="scope.row.type == 'firstArticleInspection'">首件检</span>
+              <span v-if="scope.row.type == 'instrumentRoomInspection'">仪器室</span>
+              <span v-if="scope.row.type == 'outsourcedInspector'">外协检</span>
+              <span v-if="scope.row.type == 'factoryInspection'">出厂检</span>
             </template>
           </el-table-column>
           <el-table-column label="状态" align="center" width="64">

+ 5 - 2
src/views/business/dayworkSelect/index.vue

@@ -135,6 +135,7 @@ import router from "@/router";
 import dayworkItemForm from "./form";
 import sortItemForm from "./sortForm";
 import useUserStore from "@/store/modules/user";
+import productionPlanDetailStore from "@/store/modules/productionPlanDetail";
 import { stubArray } from "lodash-es";
 
 const is_identification = ref([{
@@ -223,8 +224,10 @@ const route = useRoute();
 function getList() {
   loading.value = true;
   console.log(route.params)
-  if (route.params.productionPlanNo != ":productionPlanNo"  ) {
-    queryDayworkParams.value.productionPlanNo = route.params.productionPlanNo
+  console.log(productionPlanDetailStore().productionPlanNo)
+  if (productionPlanDetailStore().productionPlanNo !=null  ) {
+    queryDayworkParams.value.productionPlanNo = productionPlanDetailStore().productionPlanNo
+    productionPlanDetailStore().setProductionPlanDetailQueryParams(null)
   }
   getPremission();
   getDayworks();

+ 8 - 10
src/views/business/reject/index.vue

@@ -165,7 +165,7 @@
 import { listCategory } from "@/api/business/carrier";
 import { listReject } from "@/api/business/reject";
 const { proxy } = getCurrentInstance();
-const route = useRoute();
+import carrierStore from "@/store/modules/carrier";
 /** 字典数组区 */
 const { carrier_status } = proxy.useDict("carrier_status");
 /** 载具类别变量 */
@@ -201,8 +201,7 @@ const getCategories = () => {
     if (carrierCategoryList.value.length > 0) {
       currentCategory.value = carrierCategoryList.value[0];
       nextTick(() => {
-        console.log(route.params.categoryId)
-        if (route.params.categoryId != ":categoryId" && route.params.categoryId != undefined ) {
+        if (carrierStore().categoryId != null && carrierStore().carrierCode != null) {
           console.log("11")
           let a = 0;
           let b = 0;
@@ -210,7 +209,7 @@ const getCategories = () => {
           for(let i = 0;i< carrierCategoryList.value.length;i++) {
             if(carrierCategoryList.value.children) {
             for(let j = 0;j< carrierCategoryList.value[i].children.length;j++) {
-              if(carrierCategoryList.value[i].children[j].id == route.params.categoryId) {
+              if(carrierCategoryList.value[i].children[j].id == carrierStore().categoryId) {
                 a = i;
                 b = j
                 return
@@ -219,8 +218,11 @@ const getCategories = () => {
           }
           }
           currentCategory.value = carrierCategoryList.value[a].children[b];
+          queryCarrierRejectParams.value.code = carrierStore().carrierCode
           console.log(currentCategory.value)
-          proxy.$refs.categoryTable.setCurrentKey(route.params.categoryId)
+          proxy.$refs.categoryTable.setCurrentKey(carrierStore().categoryId) 
+          carrierStore().setCategoryIdQueryParams(null)
+          carrierStore().setCarrierCodeQueryParams(null)    
             }else{
               console.log("22")
               proxy.$refs.categoryTable.setCurrentKey(currentCategory.value.id);
@@ -275,10 +277,6 @@ function getNodeIndex(data) {
 const getCarriersReject = () => {
   carrierRejectLoading.value = true;
   queryCarrierRejectParams.value.categoryId = currentCategory.value.id;
-  if (route.params.carrierCode != ":carrierCode") {
-          console.log("11")
-         queryCarrierRejectParams.value.code = route.params.carrierCode
-            }
   listReject(queryCarrierRejectParams.value).then((res) => {
     carrierRejectLoading.value = false;
     carrierRejectList.value = res.rows;
@@ -291,7 +289,7 @@ const handleQueryCarrier = () => {
   getCarriersReject();
 };
 onMounted(() => {
-  getCategories();
+  getCategories()
 });
 </script>
 <style scoped>

+ 4 - 1
src/views/business/resourcePlan/index.vue

@@ -237,6 +237,7 @@ import { getDeptList } from "@/api/business/planDetailSubDetail.js";
 import planDetailDialog from "./form";
 import { ref } from "vue";
 import router from "@/router";
+import productionPlanDetailStore from "@/store/modules/productionPlanDetail";
 const route = useRoute();
 const { proxy } = getCurrentInstance();
 
@@ -308,7 +309,9 @@ function getResourceGroup() {
 }
 /** 打开批次详情页 */
 function handleColumnClick(data) {
-  router.push({ path: "/select/dayworkSelect/" + data });
+  console.log(data)
+  productionPlanDetailStore().setProductionPlanDetailQueryParams(data)
+  router.push({ path: "/select/dayworkSelect/" });
 }
 
 /**查询资源组 */

+ 2 - 2
src/views/business/storageRetrieval/index.vue

@@ -155,9 +155,9 @@
           />
           <el-table-column label="人员编号" align="center" width="80" prop="storagerUserName" />
           <el-table-column label="存录员" align="center" width="80" prop="storagerName" />
-          <el-table-column label="零存数量" align="center" width="80"  prop="storageNum" >
+          <el-table-column label="零存数量" align="center" width="90"  prop="storageNum" >
             <template #default="scope">
-              <el-input-number v-if="scope.row.editStatus" controls-position="right" v-model="scope.row.storageNum" style="width: 80px"
+              <el-input-number v-if="scope.row.editStatus" :controls="false" v-model="scope.row.storageNum" style="width: 90px"
                :min="0" />
                <span v-else>{{ scope.row.storageNum }}</span>
             </template>