|
|
|
|
@ -57,7 +57,7 @@
|
|
|
|
|
>
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<UploadImg
|
|
|
|
|
v-if="String(scope.row.zjResult) === '0'"
|
|
|
|
|
v-if="String(scope.row.zjResult) === '0' && !readOnly"
|
|
|
|
|
v-model="imageMap[String(scope.row.id)]"
|
|
|
|
|
:drag="false"
|
|
|
|
|
:show-btn-text="false"
|
|
|
|
|
@ -78,7 +78,7 @@
|
|
|
|
|
<el-table-column label="输入值" align="center" min-width="150">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-input
|
|
|
|
|
v-if="String(scope.row.zjResult) === '0'"
|
|
|
|
|
v-if="String(scope.row.zjResult) === '0' && !readOnly"
|
|
|
|
|
v-model="scope.row.textInput"
|
|
|
|
|
clearable
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
@ -119,7 +119,7 @@
|
|
|
|
|
>
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-radio-group
|
|
|
|
|
v-if="String(scope.row.zjResult) === '0'"
|
|
|
|
|
v-if="String(scope.row.zjResult) === '0' && !readOnly"
|
|
|
|
|
v-model="decisionMap[String(scope.row.id)]"
|
|
|
|
|
>
|
|
|
|
|
<el-radio :label="1">{{ t('QualityManagement.TicketResultDialog.pass') }}</el-radio>
|
|
|
|
|
@ -159,7 +159,7 @@
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="handleSave"
|
|
|
|
|
:loading="submitLoading"
|
|
|
|
|
:disabled="submitLoading || !isAllSelected()"
|
|
|
|
|
:disabled="readOnly || submitLoading || !isAllSelected()"
|
|
|
|
|
>
|
|
|
|
|
{{ t('QualityManagement.TicketResultDialog.save') }}
|
|
|
|
|
</el-button>
|
|
|
|
|
@ -179,6 +179,7 @@ const dialogVisible = ref(false)
|
|
|
|
|
const dialogTitle = ref(t('QualityManagement.TicketResultDialog.moduleName'))
|
|
|
|
|
const loading = ref(false)
|
|
|
|
|
const submitLoading = ref(false)
|
|
|
|
|
const readOnly = ref(false)
|
|
|
|
|
|
|
|
|
|
const emit = defineEmits(['success'])
|
|
|
|
|
const message = useMessage()
|
|
|
|
|
@ -196,12 +197,13 @@ const queryParams = reactive({
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const open = async (options: { id: number; status?: string | number; cancelReason?: string }) => {
|
|
|
|
|
const open = async (options: { id: number; status?: string | number; cancelReason?: string; readOnly?: boolean }) => {
|
|
|
|
|
dialogVisible.value = true
|
|
|
|
|
dialogTitle.value = t('QualityManagement.TicketResultDialog.moduleName')
|
|
|
|
|
taskId.value = options.id
|
|
|
|
|
status.value = options.status
|
|
|
|
|
cancelReason.value = options.cancelReason
|
|
|
|
|
readOnly.value = !!options.readOnly
|
|
|
|
|
for (const key of Object.keys(decisionMap)) delete decisionMap[key]
|
|
|
|
|
for (const key of Object.keys(imageMap)) delete imageMap[key]
|
|
|
|
|
queryParams.pageNo = 1
|
|
|
|
|
@ -250,6 +252,7 @@ const getRowKey = (row: ZjTaskResultVO) => {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const handleSave = async () => {
|
|
|
|
|
if (readOnly.value) return
|
|
|
|
|
if (!taskId.value) {
|
|
|
|
|
message.error('任务标识不存在,无法保存')
|
|
|
|
|
return
|
|
|
|
|
|