guoyujia 8 月之前
父節點
當前提交
61bb22120b
共有 3 個文件被更改,包括 70 次插入4 次删除
  1. 16 0
      src/router/index.js
  2. 24 3
      src/views/business/carrier/index.vue
  3. 30 1
      src/views/business/reject/index.vue

+ 16 - 0
src/router/index.js

@@ -261,6 +261,22 @@ 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: '废弃信息'
+        }
+      }
+    ]
   }
 ]
 

+ 24 - 3
src/views/business/carrier/index.vue

@@ -54,11 +54,16 @@
       <el-form class="list-search-container" :model="carrierParams" ref="queryRef" :inline="true">
         <el-form-item class="section-title" label="载具管理" />
         <el-form-item label="载具编号:">
-          <el-input placeholder="请输入载具编号" :disabled="!carrierFlag" clearable style="width: 180px"
+          <el-input placeholder="请输入载具编号" :disabled="!carrierFlag" clearable style="width: 120px"
             v-model.trim="carrierParams.code" @keydown.enter.prevent />
         </el-form-item>
+        <el-form-item label="载具状态:">
+          <el-select placeholder="请选择载具状态" clearable style="width: 140px" v-model.trim="carrierParams.isAbandoned">
+            <el-option v-for="dict in carrier_status" :key="dict.value" :label="dict.label" :value="dict.value" />
+          </el-select>
+        </el-form-item>
         <el-form-item label="打印状态:">
-          <el-select placeholder="请选择打印状态" clearable style="width: 90px" v-model.trim="carrierParams.isPrint">
+          <el-select placeholder="请选择打印状态" clearable style="width: 140px" v-model.trim="carrierParams.isPrint">
             <el-option v-for="dict in printStatus" :key="dict.value" :label="dict.label" :value="dict.value" />
           </el-select>
         </el-form-item>
@@ -83,7 +88,7 @@
             <el-table-column type="selection" width="40" align="center" :reserve-selection="true" />
             <el-table-column type="index" label="行号" width="50" align="center" />
             <el-table-column prop="code" label="载具编号" width="80" align="center" />
-            <el-table-column label="状态" width="80" prop="isAbandoned" align="center">
+            <el-table-column label="载具状态" width="80" prop="isAbandoned" align="center">
               <template #default="scope">
                 <dict-tag :options="carrier_status" :value="scope.row.isAbandoned" />
               </template>
@@ -134,6 +139,10 @@
                 <!--                >-->
                 <!--                  编辑-->
                 <!--                </el-button>-->
+                <el-button  link type="primary" icon="Comment"
+                  @click="handleCheckHidtory(scope.row)" >
+                  废弃明细
+                </el-button>
                 <el-button v-if="scope.row.isAbandoned === 0" link type="danger" icon="Delete"
                   @click="handleShowAbandonDialog(scope.row.id)" v-hasPermi="['business:carrier:abandonment']">
                   废弃
@@ -185,6 +194,7 @@ import printJS from "print-js";
 import carrierCategoryForm from "./formCategory";
 import carrierAbandonmentForm from "./formAbandonment";
 import multipleCategoryForm from "./multipleForm";
+import router from "@/router";
 import { nextTick } from "vue";
 import JSZip from "jszip";
 import { saveAs } from "file-saver";
@@ -247,6 +257,17 @@ const getCategories = () => {
 const handleMultipleCategoryDialog = () => {
   proxy.$refs.multipleCategoryRef.open();
 };
+//查看历史记录
+function handleCheckHidtory(row) {
+  console.log(row)
+  router.push({
+    name: "carrierInfo",
+    params: {
+      categoryId: row.categoryId,
+      carrierCode: row.code,
+    },
+  });
+}
 /**载具类别点击事件 */
 const handleCurrentCategoryChange = (row) => {
   if (row) {

+ 30 - 1
src/views/business/reject/index.vue

@@ -165,6 +165,7 @@
 import { listCategory } from "@/api/business/carrier";
 import { listReject } from "@/api/business/reject";
 const { proxy } = getCurrentInstance();
+const route = useRoute();
 /** 字典数组区 */
 const { carrier_status } = proxy.useDict("carrier_status");
 /** 载具类别变量 */
@@ -200,7 +201,31 @@ const getCategories = () => {
     if (carrierCategoryList.value.length > 0) {
       currentCategory.value = carrierCategoryList.value[0];
       nextTick(() => {
-        proxy.$refs.categoryTable.setCurrentKey(currentCategory.value.id);
+        console.log(route.params.categoryId)
+        if (route.params.categoryId != ":categoryId" && route.params.categoryId != undefined ) {
+          console.log("11")
+          let a = 0;
+          let b = 0;
+          console.log(carrierCategoryList.value)
+          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) {
+                a = i;
+                b = j
+                return
+              }
+            }
+          }
+          }
+          currentCategory.value = carrierCategoryList.value[a].children[b];
+          console.log(currentCategory.value)
+          proxy.$refs.categoryTable.setCurrentKey(route.params.categoryId)
+            }else{
+              console.log("22")
+              proxy.$refs.categoryTable.setCurrentKey(currentCategory.value.id);
+            }
+        
         handleCurrentCategoryChange(currentCategory.value);
       });
     } else {
@@ -250,6 +275,10 @@ 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;