Browse Source

处理日期开始时间和结束时间传递的bug

Guos 1 week ago
parent
commit
6e5a518270
1 changed files with 8 additions and 5 deletions
  1. 8 5
      src/views/store/storeConfig/userInfo.vue

+ 8 - 5
src/views/store/storeConfig/userInfo.vue

@@ -919,11 +919,13 @@ export default {
     checkDate(){
       const currentDate = new Date();
       //营业执照证
-      const businessLicenseExpireEndDate = new Date(this.form.businessLicenseExpire[1]);
-      if (businessLicenseExpireEndDate < currentDate) {
-        this.$message.warning('营业执照证已过期,无法提交');
-        return false;
-      }
+      if(!this.switchValue){
+        const businessLicenseExpireEndDate = new Date(this.form.businessLicenseExpire[1]);
+        if (businessLicenseExpireEndDate < currentDate) {
+          this.$message.warning('营业执照证已过期,无法提交');
+          return false;
+        }
+    }
       //药品经营许
       const drugLicenseExpiryEndDate = new Date(this.form.drugLicenseExpiry[1]);
       if (drugLicenseExpiryEndDate < currentDate) {
@@ -1132,6 +1134,7 @@ export default {
         this.switchMedicalValue = this.form.isMedicalDevice1ExpiryPermanent == 1;
         this.medicalDevice2ExpiryValue = this.form.isMedicalDevice2ExpiryPermanent == 1;
         this.medicalLicenseExpiryValue = this.form.isMedicalLicenseExpiryPermanent == 1;
+        this.foodLicenseExpiryValue = this.form.isFoodLicenseExpiryPermanent == 1;
         if (this.form.drugScopeHasFrozen === undefined) {
           this.form.drugScopeHasFrozen = null;
         }