From 01ee694a3bb8048372fc793a8de314d70b688b35 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期日, 18 十月 2026 22:36:21 +0800
Subject: [PATCH] 修改了工位
---
src/store/modules/checkType.ts | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 51 insertions(+), 8 deletions(-)
diff --git a/src/store/modules/checkType.ts b/src/store/modules/checkType.ts
index 82ca6f2..77feab8 100644
--- a/src/store/modules/checkType.ts
+++ b/src/store/modules/checkType.ts
@@ -8,15 +8,21 @@
export interface CheckTypeSimpleVO {
value: number
name: string
+ displayBarcode: []
+ notes: string
+ seqPrefix: string // 搴忓彿鍓嶇紑
+ expenseRecognition: number
+ /** 鏄惁闇�瑕佽澶囬鐢細0-涓嶉渶瑕侊紝1-闇�瑕侊紙鐢ㄤ簬銆岃澶囬鐢ㄣ�嶉〉鐨勬牎楠岋級 */
+ needDevReady?: number
}
export interface CheckTypeState {
- checkTypeMap: Map<number, string>
+ checkTypeMap: Map<number, CheckTypeSimpleVO>
isSetCheckType: boolean
}
export const useCheckTypeStore = defineStore('checktype ', {
state: (): CheckTypeState => ({
- checkTypeMap: new Map<number, string>(),
+ checkTypeMap: new Map<number, CheckTypeSimpleVO>(),
isSetCheckType: false
}),
getters: {
@@ -40,12 +46,12 @@
} else {
const res = await CheckTypeApi.getSimpleCheckTypeList()
// 璁剧疆鏁版嵁
- const checkTypeMap = new Map<number, string>()
+ const checkTypeMap = new Map<number, CheckTypeSimpleVO>()
res.forEach((simpleVO: CheckTypeSimpleVO) => {
// 鑾峰緱 dictType 灞傜骇
const enumValueObj = checkTypeMap[simpleVO.value]
if (!enumValueObj) {
- checkTypeMap[simpleVO.value] = simpleVO.name
+ checkTypeMap[simpleVO.value] = simpleVO
}
})
this.checkTypeMap = checkTypeMap
@@ -57,7 +63,7 @@
if (!this.isSetCheckType) {
this.setCheckTypeMap()
}
- return this.checkTypeMap[type]
+ return this.checkTypeMap[type]?.name
},
getCheckTypeOptions() {
if (!this.isSetCheckType) {
@@ -66,20 +72,57 @@
return Object.keys(this.checkTypeMap).map((key) => {
return {
value: parseInt(key, 10),
- label: this.checkTypeMap[key]
+ label: this.checkTypeMap[key].name
}
});
+ },
+ getCheckTypeDispBarCode(type: number) {
+ if (!this.isSetCheckType) {
+ this.setCheckTypeMap()
+ }
+ 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
+ },
+ /**
+ * 璇ユ鏌ラ」鐩槸鍚﹂渶瑕併�岃澶囬鐢ㄣ�嶃��
+ *
+ * 鐢ㄤ簬銆岃澶囬鐢ㄣ�嶉〉鐨勫畧鍗細鍙湁闇�瑕佽澶囬鐢ㄧ殑椤圭洰锛堝鍔ㄦ�佸績鐢点�佸姩鎬佽鍘嬶級
+ * 鎵嶅簲杩涘叆棰嗙敤娴佺▼锛涘父瑙勫績鐢靛浘绛変笉闇�瑕侀鐢ㄧ殑椤圭洰鑻ヨ鎷夊埌璇ラ〉锛屽簲鎷︿笅骞舵彁绀猴紝
+ * 鍚﹀垯浼氬嚭鐜�"妫�鏌ョ被鎮h�呭嚭鐜板湪璁惧棰嗙敤妯″潡"鐨勬贩涔便��
+ */
+ getNeedDevReady(type: number) {
+ if (!this.isSetCheckType) {
+ this.setCheckTypeMap()
+ }
+ return this.checkTypeMap[type]?.needDevReady
},
async resetCheckTypeInfo() {
wsCache.delete(CACHE_KEY.CHECKTYPE_CACHE)
const res = await CheckTypeApi.getSimpleCheckTypeList()
// 璁剧疆鏁版嵁
- const checkTypeMap = new Map<number, string>()
+ const checkTypeMap = new Map<number, CheckTypeSimpleVO>()
res.forEach((simpleVO: CheckTypeSimpleVO) => {
// 鑾峰緱 dictType 灞傜骇
const enumValueObj = checkTypeMap[simpleVO.value]
if (!enumValueObj) {
- checkTypeMap[simpleVO.value] = simpleVO.name
+ checkTypeMap[simpleVO.value] = simpleVO
}
})
this.checkTypeMap = checkTypeMap
--
Gitblit v1.9.3