| | |
| | | const modelOptions = ref([]); |
| | | |
| | | // 打开弹框 |
| | | const openDialog = async (type, row, defaultCheckResult = "") => { |
| | | const openDialog = async (type, row, defaultCheckResult = "", defaultCheckName = "") => { |
| | | operationType.value = type; |
| | | getOptions().then((res) => { |
| | | supplierList.value = res.data; |
| | |
| | | form.value = { |
| | | checkTime: "", |
| | | process: "", |
| | | checkName: "", |
| | | checkName: defaultCheckName || "", |
| | | productName: "", |
| | | productId: "", |
| | | productModelId: "", |
| | |
| | | form.value = {...row, testStandardId: ''} |
| | | // 如果传入了默认检测结果,覆盖row中的值 |
| | | if (defaultCheckResult) { |
| | | form.value.checkResult = defaultCheckResult; |
| | | form.value.checkResult = defaultCheckResult; |
| | | } |
| | | // 如果传入了默认检验员,覆盖row中的值(优先使用传入的检验员) |
| | | console.log('formDia checkName debug:', { defaultCheckName, rowCheckName: row.checkName }); |
| | | form.value.checkName = defaultCheckName || row.checkName || ""; |
| | | currentProductId.value = row.productId || 0 |
| | | // 关键:编辑时加载规格型号下拉选项,才能反显 productModelId |
| | | if (currentProductId.value) { |