Просмотр исходного кода

出入库明细表 添加跳转链接

changhaoning 1 год назад
Родитель
Сommit
6c6660dc5f

+ 12 - 1
src/config/index.js

@@ -462,7 +462,18 @@ export default {
   intoType: {
     purchase: '采购入库',
     other: '其他入库',
-    saleReturn: '销退入库'
+    saleReturn: '采退入库'
+  },
+
+  /**
+  * @desc   : desc
+  * @author : 常皓宁
+  * @date   : 2024/5/22 14:50
+  */
+  outType: {
+    sale: '销售出库',
+    other: '其他出库',
+    saleReturn: '销退回库'
   },
 
   /**

+ 36 - 0
src/view/report/detail-report/index.vue

@@ -86,6 +86,42 @@ export default {
         if(item['linkType'] == 'PUR'){
           this.$router.push('/pur/pur-order/edit/' + row['purId'])
         }
+        //入库跳转
+        if(item['linkType'] == 'INTO'){
+          //采购入库
+          if(row['intoTypeName'] == this.$config.intoType.purchase){
+            this.$router.push('/pur/pur-enter/edit/' + row['intoId'])
+          }
+          //采退入库
+          if(row['intoTypeName'] == this.$config.intoType.saleReturn){
+            this.$router.push('/pur/pur-return/edit/' + row['intoId'])
+          }
+          //其他入库
+          else if(row['intoTypeName'] == this.$config.intoType.other){
+            this.$router.push({
+              name: 'entry-handle-edit',
+              params: {id: row['intoId']}
+            });
+          }
+        }
+        //出库跳转
+        if(item['linkType'] == 'OUT'){
+          //销售出库
+          if(row['outTypeName'] == this.$config.outType.sale){
+            this.$router.push('/sale/order-out/edit/' + row['outId'])
+          }
+          //销退回库
+          if(row['outTypeName'] == this.$config.outType.saleReturn){
+            this.$router.push('/sale/order-return/edit/' + row['outId'])
+          }
+          //其他出库
+          else if(row['outTypeName'] == this.$config.outType.other){
+            this.$router.push({
+              name: 'out-handle-edit',
+              params: {id: row['outId']}
+            });
+          }
+        }
       }
     },
     /**

+ 2 - 2
src/view/report/detail-report/setting.js

@@ -585,7 +585,7 @@ const data = {
     ],
     // 列表列
     columns: [
-      {field: 'outNo'},
+      {field: 'outNo',type: 'link',linkType: 'OUT'},
       {field: 'fromNo'},
       {field: 'outTypeName'},
       {field: 'outStatusName'},
@@ -783,7 +783,7 @@ const data = {
     ],
     // 列表列
     columns: [
-      {field: 'intoNo'},
+      {field: 'intoNo',type:'link',linkType: 'INTO'},
       {field: 'fromNo'},
       {field: 'intoTypeName'},
       {field: 'intoStatusName'},