diff --git a/src/api/mes/ticketManagement/index.ts b/src/api/mes/ticketManagement/index.ts
index 08612481..49c76f18 100644
--- a/src/api/mes/ticketManagement/index.ts
+++ b/src/api/mes/ticketManagement/index.ts
@@ -24,6 +24,8 @@ export interface TicketResultVO {
inspectionItemName?: string
inspectionMethod?: string
judgmentCriteria?: string
+ valueType?: string | number
+ textInput?: string
inspectionResult?: string | number
images?: string
remark?: string
diff --git a/src/api/mes/zjtask/index.ts b/src/api/mes/zjtask/index.ts
index be4b5192..96483a10 100644
--- a/src/api/mes/zjtask/index.ts
+++ b/src/api/mes/zjtask/index.ts
@@ -32,6 +32,7 @@ export interface ZjTaskResultVO {
remark: string
images?: string
zjResult?: number
+ textInput?: string
}
export const ZjTaskApi = {
@@ -64,7 +65,7 @@ export const ZjTaskApi = {
},
batchUpdateZjTaskResults: async (
- results: { id: number; taskId: number; images?: string; zjResult: number }[],
+ results: { id: number; taskId: number; images?: string; zjResult: number; textInput?: string }[],
) => {
return await request.post({ url: `/mes/zj-task-results/batch-update`, data: { results } })
},
diff --git a/src/api/mold/ticketManagement/index.ts b/src/api/mold/ticketManagement/index.ts
index 96666854..11370a49 100644
--- a/src/api/mold/ticketManagement/index.ts
+++ b/src/api/mold/ticketManagement/index.ts
@@ -24,6 +24,8 @@ export interface TicketResultVO {
inspectionItemName?: string
inspectionMethod?: string
judgmentCriteria?: string
+ valueType?: string | number
+ textInput?: string
inspectionResult?: string | number
images?: string
remark?: string
diff --git a/src/views/mes/workOrderManagement/components/TicketResultDialog.vue b/src/views/mes/workOrderManagement/components/TicketResultDialog.vue
index ff3adde0..d9183a2a 100644
--- a/src/views/mes/workOrderManagement/components/TicketResultDialog.vue
+++ b/src/views/mes/workOrderManagement/components/TicketResultDialog.vue
@@ -1,5 +1,5 @@
-
+
+
+
+ {{ getTagLabel('value_types', scope.row.valueType) }}
+
+ -
+
+
+
+
+
+ -
+
+
import { TicketManagementApi, TicketResultVO } from '@/api/mes/ticketManagement'
+import { getStrDictOptions } from '@/utils/dict'
+import { isHexColor } from '@/utils/color'
+import { useDictStoreWithOut } from '@/store/modules/dict'
defineOptions({ name: 'TicketResultDialog' })
@@ -132,6 +159,9 @@ const emit = defineEmits(['success'])
const message = useMessage()
const { t } = useI18n()
+const dictStore = useDictStoreWithOut()
+const dictReady = ref(false)
+
const dialogVisible = ref(false)
const dialogTitle = ref(t('EquipmentManagement.WorkOrderManagement.dialogTitleDefault'))
const loading = ref(false)
@@ -145,6 +175,37 @@ const cancelReason = ref(undefined)
const decisionMap = reactive>({})
const imageMap = reactive>({})
+const getTagDict = (dictType: string, value: any) => {
+ if (!dictReady.value) return undefined
+ const v = value === '' || value === null || value === undefined ? undefined : String(value)
+ if (!v) return undefined
+ return getStrDictOptions(dictType).find((d) => d.value === v)
+}
+
+const getTagLabel = (dictType: string, value: any) => {
+ const found = getTagDict(dictType, value)
+ return found?.label ?? (value ?? '')
+}
+
+const getTagType = (dictType: string, value: any) => {
+ const found = getTagDict(dictType, value)
+ const type = found?.colorType
+ if (type + '' === 'primary' || type + '' === 'default') return '' as any
+ return (type ?? '') as any
+}
+
+const getTagColor = (dictType: string, value: any) => {
+ const found = getTagDict(dictType, value)
+ if (found?.cssClass && isHexColor(found.cssClass)) return found.cssClass
+ return ''
+}
+
+const getTagStyle = (dictType: string, value: any) => {
+ const color = getTagColor(dictType, value)
+ if (!color) return ''
+ return 'color: #fff'
+}
+
const queryParams = reactive({
pageNo: 1,
pageSize: 10
@@ -164,6 +225,11 @@ const open = async (options: { managementId: number; title?: string; jobStatus?:
defineExpose({ open })
+onMounted(async () => {
+ await dictStore.setDictMap()
+ dictReady.value = true
+})
+
const getList = async () => {
if (!managementId.value) return
loading.value = true
diff --git a/src/views/mes/zjTask/components/ZjTaskResultDialog.vue b/src/views/mes/zjTask/components/ZjTaskResultDialog.vue
index b5fa9b96..1382b4e1 100644
--- a/src/views/mes/zjTask/components/ZjTaskResultDialog.vue
+++ b/src/views/mes/zjTask/components/ZjTaskResultDialog.vue
@@ -75,6 +75,17 @@
-
+
+
+
+ {{ scope.row.textInput || '-' }}
+
+
{
const decision = decisionMap[String(row.id)]
if (decision !== 1 && decision !== 2) continue
const img = imageMap[String(row.id)] || row.images
- payload.push({ id: row.id, taskId: currentTaskId, images: img, zjResult: decision })
+ payload.push({ id: row.id, taskId: currentTaskId, images: img, zjResult: decision, textInput: row.textInput })
}
if (!payload.length) {
message.error('暂无需要保存的记录')
@@ -301,3 +312,8 @@ const isAllSelected = () => {
return true
}
+
diff --git a/src/views/mold/workOrderInquiry/components/TicketResultDialog.vue b/src/views/mold/workOrderInquiry/components/TicketResultDialog.vue
index 3ce463dd..d104224b 100644
--- a/src/views/mold/workOrderInquiry/components/TicketResultDialog.vue
+++ b/src/views/mold/workOrderInquiry/components/TicketResultDialog.vue
@@ -1,5 +1,5 @@
-
+
@@ -29,6 +29,30 @@ v-else-if="scope.row.images" :src="parseFirstImage(scope.row.images)"
-
+
+
+
+ {{ getTagLabel('value_types', scope.row.valueType) }}
+
+ -
+
+
+
+
+
+ -
+
+
@@ -63,12 +87,18 @@ v-else-if="scope.row.images" :src="parseFirstImage(scope.row.images)"