Преглед изворни кода

新加检验标签是否重复公共方法
给新页面新加路由缓存
结算中心 tabs新加tabs重复校验

Qukatie пре 1 недеља
родитељ
комит
dbfc5b5faa

+ 8 - 5
src/main.js

@@ -8,7 +8,8 @@ import './error'; // 日志
 import './cache'; //页面缓存
 import store from './store';
 import {
-  loadStyle
+  loadStyle,
+  verifyTags
 } from './util/util'
 import * as urls from '@/config/env';
 import Element from 'element-ui';
@@ -191,8 +192,10 @@ Vue.prototype.onLock = onLock;
 Vue.prototype.unLock = unLock;
 Vue.prototype.checkLocks = checkLocks;
 //业务上锁
-Vue.prototype.submitLock=submitLock;
-Vue.prototype.overdueJudgment=overdueJudgment;
+Vue.prototype.submitLock = submitLock;
+Vue.prototype.overdueJudgment = overdueJudgment;
+//检验标签是否重复
+Vue.prototype.verifyTags = verifyTags
 new Vue({
   router,
   store,
@@ -363,8 +366,8 @@ Fingerprint2.get(function (components) {
   // 生成最终id murmur
   let murmur = Fingerprint2.x64hash128(values.join(''), 31)
   // 2025-10-16 有时候无指纹??
-  if(!murmur){
-      murmur = Fingerprint2.x64hash128("none", 31)
+  if (!murmur) {
+    murmur = Fingerprint2.x64hash128("none", 31)
   }
 
   // console.log('Fingerprint2', 'values', values, 'murmur', murmur)

+ 39 - 0
src/router/views/index.js

@@ -4197,4 +4197,43 @@ export default [{
     component: () => import( /* webpackChunkName: "views" */ '@/views/iosBasicData/dcOffset/index')
   }]
 },
+{
+  path: '/iosBasicData/writeOff/index',
+  component: Layout,
+  hidden: true,
+  children: [{
+    path: '/iosBasicData/writeOff/index',
+    name: '挂账销账',
+    meta: {
+      keepAlive: true,
+    },
+    component: () => import( /* webpackChunkName: "views" */ '@/views/iosBasicData/writeOff/index')
+  }]
+},
+{
+  path: '/iosBasicData/advancePayment/index',
+  component: Layout,
+  hidden: true,
+  children: [{
+    path: '/iosBasicData/advancePayment/index',
+    name: '预付款管理',
+    meta: {
+      keepAlive: true,
+    },
+    component: () => import( /* webpackChunkName: "views" */ '@/views/iosBasicData/advancePayment/index')
+  }]
+},
+{
+  path: '/iosBasicData/cashier/index',
+  component: Layout,
+  hidden: true,
+  children: [{
+    path: '/iosBasicData/cashier/index',
+    name: '出纳管理',
+    meta: {
+      keepAlive: true,
+    },
+    component: () => import( /* webpackChunkName: "views" */ '@/views/iosBasicData/cashier/index')
+  }]
+},
 ]

+ 13 - 0
src/util/util.js

@@ -1,4 +1,17 @@
 import {validatenull} from './validate'
+import store from '@/store';
+import { MessageBox } from 'element-ui';
+//检验标签是否重复
+export const verifyTags = (name) => {
+  console.log(store.getters.tagList, name)
+  const tagList = store.getters.tagList
+  if (tagList.filter(item => item.label == name).length > 0) {
+    MessageBox.alert(`请关闭重复的${name}标签,否则无法进行操作!`, '提示', { type: 'warning' });
+    return false
+  }
+  return true
+  // const tagList=state.tagList
+}
 //表单序列化
 export const serialize = data => {
   let list = [];

+ 52 - 38
src/views/iosBasicData/ComputationCenter/index.vue

@@ -43,7 +43,9 @@
       >
         <template slot="menuLeft">
           <el-button
-            v-if="tabsValue == 'CHK-D' || tabsValue == 'CHK-C' || tabsValue == 'FFSQ' || tabsValue == 'XXFP' || tabsValue == 'DCDD'|| tabsValue == 'GZXZ'"
+            v-if="
+              tabsValue == 'CHK-D' || tabsValue == 'CHK-C' || tabsValue == 'FFSQ' || tabsValue == 'XXFP' || tabsValue == 'DCDD' || tabsValue == 'GZXZ'
+            "
             type="primary"
             size="small"
             plain
@@ -86,7 +88,9 @@
             >驳回
           </el-button>
           <el-button
-            v-if="tabsValue == 'CHK-D' || tabsValue == 'CHK-C' || tabsValue == 'FFSQ'|| tabsValue == 'XXFP' || tabsValue == 'DCDD'|| tabsValue == 'GZXZ'"
+            v-if="
+              tabsValue == 'CHK-D' || tabsValue == 'CHK-C' || tabsValue == 'FFSQ' || tabsValue == 'XXFP' || tabsValue == 'DCDD' || tabsValue == 'GZXZ'
+            "
             type="text"
             size="small"
             :disabled="
@@ -481,7 +485,11 @@ export default {
         });
         this.isShow = false;
         this.$nextTick(() => {
-          this.$refs.settlementDetailsRef.generateFinStlBillsfun(arrId.join(","), this.tabsValue == "CHK-D"||this.tabsValue == "XXFP"||this.tabsValue == "GZXZ" ? "D" : "C", this.tabsValue);
+          this.$refs.settlementDetailsRef.generateFinStlBillsfun(
+            arrId.join(","),
+            this.tabsValue == "CHK-D" || this.tabsValue == "XXFP" || this.tabsValue == "GZXZ" ? "D" : "C",
+            this.tabsValue
+          );
         });
       });
     },
@@ -506,7 +514,11 @@ export default {
       this.isShow = false;
       // this.editSave = true
       this.$nextTick(() => {
-        this.$refs.settlementDetailsRef.generateFinStlBillsfun(row.id, this.tabsValue == "CHK-D"||this.tabsValue == "XXFP"||this.tabsValue == "GZXZ" ? "D" : "C", this.tabsValue);
+        this.$refs.settlementDetailsRef.generateFinStlBillsfun(
+          row.id,
+          this.tabsValue == "CHK-D" || this.tabsValue == "XXFP" || this.tabsValue == "GZXZ" ? "D" : "C",
+          this.tabsValue
+        );
       });
     },
     // 添加
@@ -523,13 +535,7 @@ export default {
     // 编辑
     editfun(row) {
       if (this.tabsValue == "FFSQ") {
-        if (this.$store.getters.payAppStatus) {
-          this.$alert("付费申请页面已存在,请关闭付费申请再进行操作", "温馨提示", {
-            confirmButtonText: "确定",
-            type: "warning",
-            callback: action => {}
-          });
-        } else {
+        if (this.verifyTags("付费申请(F)")) {
           this.$router.push({
             path: `/iosBasicData/PaymentApplication/index`,
             query: {
@@ -538,34 +544,42 @@ export default {
           });
         }
       } else if (this.tabsValue == "CHK-D" || this.tabsValue == "CHK-C") {
-        this.$router.push({
-          path: `/iosBasicData/finstlbills/index`,
-          query: {
-            id: row.id
-          }
-        });
+        if (this.verifyTags("对账中心(F)")) {
+          this.$router.push({
+            path: `/iosBasicData/finstlbills/index`,
+            query: {
+              id: row.id
+            }
+          });
+        }
       } else if (this.tabsValue == "DCDD") {
-        this.$router.push({
-          path: `/iosBasicData/dcOffset/index`,
-          query: {
-            id: row.id
-          }
-        });
-      }else if (this.tabsValue == "XXFP") {
-        this.$router.push({
-          path: `/iosBasicData/fininvoicesOutput/index`,
-          query: {
-            id: row.id
-          }
-        });
+        if (this.verifyTags("收付相抵")) {
+          this.$router.push({
+            path: `/iosBasicData/dcOffset/index`,
+            query: {
+              id: row.id
+            }
+          });
+        }
+      } else if (this.tabsValue == "XXFP") {
+        if (this.verifyTags("销项发票")) {
+          this.$router.push({
+            path: `/iosBasicData/fininvoicesOutput/index`,
+            query: {
+              id: row.id
+            }
+          });
+        }
       } else if (this.tabsValue == "GZXZ") {
-        this.$router.push({
-          path: `/iosBasicData/writeOff/index`,
-          query: {
-            id: row.id
-          }
-        });
-      }else {
+        if (this.verifyTags("挂账销账")) {
+          this.$router.push({
+            path: `/iosBasicData/writeOff/index`,
+            query: {
+              id: row.id
+            }
+          });
+        }
+      } else {
         this.pageIds = [];
         this.data.forEach(item => {
           this.pageIds.push(item.id);
@@ -819,7 +833,7 @@ export default {
         // 调用 销项发票业务数据
         res = await finstlbillsList(page.currentPage, page.pageSize, {
           ...Object.assign(params, this.query),
-           businessType: "GZXZ",
+          businessType: "GZXZ",
           status: 3,
           billStatus: 0
         });

+ 4 - 0
src/views/iosBasicData/writeOff/index.vue

@@ -585,6 +585,10 @@ export default {
       // 从审批里查看跳进来的
       this.editFun({ id: this.$route.query.billId });
     }
+    // if (this.$route.query.id) {
+    //   // 从审批里查看跳进来的
+    //   this.editFun({ id: this.$route.query.id });
+    // }
     this.$store.commit("DZZXF_IN_DETAIL");
     this.dictionaryfun(); // 获取字典数据
   },