|
|
|
@ -93,14 +93,18 @@ const isShowSaveButton = computed(() => {
@@ -93,14 +93,18 @@ const isShowSaveButton = computed(() => {
|
|
|
|
|
return props.info?.status === undefined ? true : props.info.status < 2 |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
async function onChangeRadio(row: any) { |
|
|
|
|
const res = await updateSheetStatus(row.id, row.actualResult) |
|
|
|
|
if (isResError(res)) return |
|
|
|
|
massage.success('更新成功') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async function onSave() { |
|
|
|
|
if (!props.info) return |
|
|
|
|
if (list.value.length === 0) { |
|
|
|
|
massage.error('请先添加测试单') |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
const findErrorSheet = list.value.find((item: any) => item.status !== 1) |
|
|
|
|
if (!!findErrorSheet) { |
|
|
|
|
massage.error(`${findErrorSheet.name}测试单测试结果失败,成功后才能入库`) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const res = await updateTestSheetStatus({ |
|
|
|
|
// id: props.info.testSheetId, |
|
|
|
|
deviceId: props.info.id, |
|
|
|
@ -116,6 +120,7 @@ async function loadDeviceTestSheet() {
@@ -116,6 +120,7 @@ async function loadDeviceTestSheet() {
|
|
|
|
|
}) |
|
|
|
|
if (isResError(res)) return |
|
|
|
|
list.value = res.data |
|
|
|
|
console.log(list.value) |
|
|
|
|
} |
|
|
|
|
const isShowDetail = ref(false) |
|
|
|
|
const sheetDetail = ref<any>([]) |
|
|
|
|