eight
2025-04-15 131726d427b95447df6c1ee14e1c36a0715b2033
src/store/modules/checkType.ts
@@ -10,6 +10,8 @@
  name: string
  displayBarcode: []
  notes: string
  seqPrefix: string // 序号前缀
  expenseRecognition: number
}
export interface CheckTypeState {
  checkTypeMap: Map<number, CheckTypeSimpleVO>
@@ -59,7 +61,7 @@
      if (!this.isSetCheckType) {
        this.setCheckTypeMap()
      }
      return this.checkTypeMap[type].name
      return this.checkTypeMap[type]?.name
    },
    getCheckTypeOptions() {
      if (!this.isSetCheckType) {
@@ -76,7 +78,7 @@
      if (!this.isSetCheckType) {
        this.setCheckTypeMap()
      }
      return this.checkTypeMap[type].displayBarcode
      return this.checkTypeMap[type]?.displayBarcode
    },
    getCheckTypeNotes(type: number) {
      if (!this.isSetCheckType) {
@@ -84,6 +86,18 @@
      }
      return this.checkTypeMap[type].notes
    },
    getCheckTypeSeqPrefix(type: number) {
      if (!this.isSetCheckType) {
        this.setCheckTypeMap()
      }
      return this.checkTypeMap[type]?.seqPrefix || ''
    },
    getExpenseRecognition(type: number) {
      if (!this.isSetCheckType) {
        this.setCheckTypeMap()
      }
      return this.checkTypeMap[type]?.expenseRecognition
    },
    async resetCheckTypeInfo() {
      wsCache.delete(CACHE_KEY.CHECKTYPE_CACHE)
      const res = await CheckTypeApi.getSimpleCheckTypeList()