|
|
@@ -2057,6 +2057,18 @@ function handleUpdate(row) {
|
|
|
const id = row.id || ids.value
|
|
|
getGxtOrder(id).then(response => {
|
|
|
form.value = response.data
|
|
|
+ // 关键:处理 inspectionType 逗号字符串 -> 数组,支持多选回填
|
|
|
+ if (form.value.inspectionType) {
|
|
|
+ // 1. 分割字符串为数组(去除首尾空格,避免空值)
|
|
|
+ form.value.inspectionType = form.value.inspectionType
|
|
|
+ .toString() // 确保是字符串类型,防止报错
|
|
|
+ .trim() // 去除首尾空格
|
|
|
+ .split(',') // 按逗号分割为数组
|
|
|
+ .filter(item => item) // 过滤空字符串(避免分割后出现 [""] 无效值)
|
|
|
+ } else {
|
|
|
+ // 无数据时赋值为空数组,避免 v-model 绑定非数组类型
|
|
|
+ form.value.inspectionType = []
|
|
|
+ }
|
|
|
if (form.value.orderEntryType == '2') {
|
|
|
backfillDialogVisible.value = true
|
|
|
} else {
|