shmily1213 3 месяцев назад
Родитель
Сommit
410d5e5932
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      back-ui/src/views/dz/cards/components/AssignDialog.vue

+ 4 - 1
back-ui/src/views/dz/cards/components/AssignDialog.vue

@@ -129,8 +129,11 @@ const emit = defineEmits(['refresh'])
 const handleConfirm = () => {
 const handleConfirm = () => {
   formRef.value.validate(async (valid) => {
   formRef.value.validate(async (valid) => {
     if (valid) {
     if (valid) {
-      const { cardType, agentId, begin, end, location, assignExamType, schoolId, days } = form.value;
+      let { cardType, agentId, begin, end, location, assignExamType, schoolId, days } = form.value;
       modalRef.value.showLoading()
       modalRef.value.showLoading()
+      if (cardType !== '9') {
+        days = undefined;
+      }
       assignCard(cardType, agentId, begin, end, location, assignExamType, schoolId, days).then(res => {
       assignCard(cardType, agentId, begin, end, location, assignExamType, schoolId, days).then(res => {
         proxy.$modal.msgSuccess('分配卡成功')
         proxy.$modal.msgSuccess('分配卡成功')
         close();
         close();