| | |
| | | </PIMTable> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">确认</el-button> |
| | | <el-button type="primary" :loading="submitting" @click="submitForm">确认</el-button> |
| | | <el-button @click="closeDia">取消</el-button> |
| | | </div> |
| | | </template> |
| | |
| | | |
| | | |
| | | const dialogFormVisible = ref(false); |
| | | const submitting = ref(false); |
| | | const operationType = ref('') |
| | | const data = reactive({ |
| | | form: { |
| | |
| | | // 工序变化处理 |
| | | // 提交产品表单 |
| | | const submitForm = () => { |
| | | if (submitting.value) { |
| | | return; |
| | | } |
| | | proxy.$refs.formRef.validate(valid => { |
| | | if (valid) { |
| | | form.value.inspectType = 1 |
| | |
| | | process: processName, // 保留 process 字段以兼容后端 |
| | | qualityInspectParams: tableData.value |
| | | } |
| | | submitting.value = true; |
| | | if (operationType.value === "add") { |
| | | qualityInspectAdd(data).then(res => { |
| | | proxy.$modal.msgSuccess("提交成功"); |
| | | closeDia(); |
| | | }).catch(() => {}).finally(() => { |
| | | submitting.value = false; |
| | | }) |
| | | } else { |
| | | qualityInspectUpdate(data).then(res => { |
| | | proxy.$modal.msgSuccess("提交成功"); |
| | | closeDia(); |
| | | }).catch(() => {}).finally(() => { |
| | | submitting.value = false; |
| | | }) |
| | | } |
| | | } |