Przeglądaj źródła

fix 作废字典增加

ylong 3 miesięcy temu
rodzic
commit
eb0d556ef4

+ 6 - 2
src/views/code/record/components/invalid-modal.vue

@@ -3,7 +3,7 @@
         <div class="invalid-form">
             <div class="form-item">
                 <label class="form-label">请选择作废原因</label>
-                <dict-data v-model="selectedReason" code="invalid_reason" placeholder="请选择" />
+                <dict-data v-model="selectedReason" :code="type == 1  ? 'in_invalid_reason' : 'out_invalid_reason'" placeholder="请选择" />
             </div>
         </div>
 
@@ -33,8 +33,10 @@ const currentRecord = ref(null);
 const selectedReason = ref('');
 
 // 打开弹窗
+const type = ref('');
 const handleOpen = (record) => {
     currentRecord.value = record;
+    type.value = record.type;
     visible.value = true;
     selectedReason.value = '';
 };
@@ -110,12 +112,14 @@ const emit = defineEmits(['success']);
 
 .form-item {
     margin-bottom: 20px;
+    display: flex;
+    align-items: center;
 }
 
 .form-label {
     display: block;
-    margin-bottom: 8px;
     font-weight: 500;
     color: #333;
+    width: 140px;
 }
 </style>