Parcourir la source

切换项目更新

ZaiZai il y a 11 mois
Parent
commit
da815e3256
1 fichiers modifiés avec 9 ajouts et 4 suppressions
  1. 9 4
      src/views/tentative/material/sampling.vue

+ 9 - 4
src/views/tentative/material/sampling.vue

@@ -464,6 +464,7 @@ const addEditFormModal = ref(false)
 const addFormModalClick = () => {
     const toDayDate = new Dayjs().format('YYYY-MM-DD')
     addEditFormModel.value = {
+        isRfid: 0,
         isOutsourcing: 0,
         mobilizationId: '',
         mobilizationDate: toDayDate,
@@ -474,14 +475,18 @@ const addFormModalClick = () => {
     addEditFormModal.value = true
     requestDevice()
 }
+
 //编辑
 const editFormModalClick = () => {
     const keys = tableCheckedKeys.value
     if (keys.length === 1) {
-        // addEditFormModel.value = keys[0]
-        addEditFormModel.value = { ...keys[0] }
-        addEditFormModel.value.representativeCount = addEditFormModel.value.representativeCount === -1 ? '' : addEditFormModel.value.representativeCount
-        addEditFormModel.value.materialCount = addEditFormModel.value.materialCount === -1 ? '' : addEditFormModel.value.materialCount
+        const obj = deepClone(keys[0])
+        addEditFormModel.value = {
+            ...obj,
+            representativeCount: obj.representativeCount === -1 ? '' : obj.representativeCount,
+            materialCount: obj.materialCount === -1 ? '' : obj.materialCount,
+            isRfid: isNullES(obj.isRfid) ? 0 : obj.isRfid,
+        }
         addEditFormModal.value = true
         requestDevice()
     } else if (keys.length > 1) {