| | |
| | | }; |
| | | |
| | | const openForm = (type, row) => { |
| | | if (type === 'edit' && !hasNonconformingEdit.value) return |
| | | if (type !== 'add' && row?.inspectState == 1) { |
| | | toast('已处理的数据不能再编辑') |
| | | return |
| | | } |
| | | // if (type === 'edit' && !hasNonconformingEdit.value) return |
| | | // if (type !== 'add' && row?.inspectState == 1) { |
| | | // toast('已处理的数据不能再编辑') |
| | | // return |
| | | // } |
| | | const id = row?.id |
| | | let fallback = '' |
| | | if (row) { |
| | | const fallbackData = { |
| | | batchNo: row.batchNo ?? '', |
| | | checkType: row.checkType ?? row.inspectType ?? '' |
| | | } |
| | | fallback = `&fallback=${encodeURIComponent(JSON.stringify(fallbackData))}` |
| | | } |
| | | uni.navigateTo({ |
| | | url: `/pages/qualityManagement/nonconformingManagement/form?type=${type}${id ? `&id=${id}` : ''}` |
| | | url: `/pages/qualityManagement/nonconformingManagement/form?type=${type}${id ? `&id=${id}` : ''}${fallback}` |
| | | }) |
| | | } |
| | | |