eight
2025-03-31 54081618d902a83db25b8b9a54872b593034c2c9
src/store/modules/checkType.ts
@@ -8,7 +8,10 @@
export interface CheckTypeSimpleVO {
  value: number
  name: string
  displayBarcode: number
  displayBarcode: []
  notes: string
  seqPrefix: string // 序号前缀
  expenseRecognition: number
}
export interface CheckTypeState {
  checkTypeMap: Map<number, CheckTypeSimpleVO>
@@ -77,6 +80,24 @@
      }
      return this.checkTypeMap[type].displayBarcode
    },
    getCheckTypeNotes(type: number) {
      if (!this.isSetCheckType) {
        this.setCheckTypeMap()
      }
      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()