Jelajahi Sumber

取消按钮去掉

sunjh 6 tahun lalu
induk
melakukan
2b142abd51

+ 5 - 10
src/components/authen/AgencyAuthenticationCreate.vue

@@ -236,20 +236,15 @@ export default {
         //this.rolesPermissions = getRolesPermissions(res.roleList)
         storageSave('rolesPermissions', getRolesPermissions(res.roleList))
         this.hideLoading()
-        this.$confirm('认证信息提交成功,将于10个工作日内审核完成')
-          .then(_ => {
-            //done()
+        this.$alert('认证信息提交成功,将于3个工作日内审核完成', '提交成功', {
+          confirmButtonText: '确定',
+          callback: action => {
             this.$router.push({
               name: 'AgencyAuthentication',
               params: {userId: this.user.userVO.id}
             })
-          })
-          .catch(_ => {
-            this.$router.push({
-              name: 'AgencyAuthentication',
-              params: {userId: this.user.userVO.id}
-            })
-          })
+          }
+        });
       }).catch((error) => {
         this.hideLoading()
         notify('error', '重新获取用户信息失败:' + error.data)

+ 1 - 1
src/components/authen/EnterpriseAuthentication.vue

@@ -2,7 +2,7 @@
   <div class="create-container">
     <div class="create-body" v-loading="loading">
       <div class="title">企业信息认证</div>
-      <el-form :model="authentication" :rules="rules" ref="authentication" label-width="12%" class="demo-report">
+      <el-form :model="authentication" :rules="rules" ref="authentication" label-width="15%" class="demo-report">
         <el-form-item label="公司名" prop="enterpriseName">
           <el-input v-if="isModifyMode" v-model="authentication.enterpriseName"></el-input>
           <span v-if="!isModifyMode">{{authentication.enterpriseName}}</span>

+ 84 - 82
src/components/authen/EnterpriseAuthenticationCreate.vue

@@ -2,7 +2,7 @@
   <div class="create-container" v-loading="loading">
     <div class="create-body">
       <div class="title">企业信息认证</div>
-      <el-form :model="authentication" :rules="rules" ref="authentication" label-width="12%" class="demo-report">
+      <el-form :model="authentication" :rules="rules" ref="authentication" label-width="15%" class="demo-report">
         <el-form-item label="公司名" prop="enterpriseName">
           <el-input size="small" v-if="isModifyMode" v-model="authentication.enterpriseName"></el-input>
           <!--<span v-if="!isModifyMode">{{authentication.name}}</span>-->
@@ -82,54 +82,54 @@ export default {
         address: ''
       },
       rules: {
-          enterpriseName: [
-              {required: true, message: '请输入公司名称', trigger: 'blur'},
-              {min: 3, max: 50, message: '机构名称长度在 3 到 50 个字符', trigger: 'blur'}
-          ],
-          businessLicensePhoto: [
-              {
-                  validator: (rule, value, callback) => {
-                      console.log(value);
-                      if (value == null || value == '') {
-                          callback(new Error('公司营业执照不能为空'))
-                      } else {
-                          callback()
-                      }
-                  },
-                  trigger: 'blue'
-              },
-          ],
-          legalPersonName: [
-              {required: true, message: '请输入公司法人姓名', trigger: 'blur'}
-          ],
-          bankAccount: [
-              {required: true, message: '请输入对公账户', trigger: 'blur'},
-              {
-                  validator: (rule, value, callback) => {
-                      if (!this.checkNumber(value)) {
-                          callback(new Error('对公账户输入有误'))
-                      } else {
-                          callback()
-                      }
-                  },
-                  trigger: 'blur'
-              },
-          ],
-          unifiedSocialCreditCode: [
-              {required: true, message: '请输入统一社会信用代码', trigger: 'blur'},
-              {
-                  validator: (rule, value, callback) => {
-                      if (!this.checkNumberAndWord(value)) {
-                          callback(new Error('统一社会信用代码输入有误'))
-                      } else {
-                          callback()
-                      }
-                  }, trigger: 'blur'
-              },
-          ],
-          address: [
-              {required: true, message: '请输入公司地址', trigger: 'blur'}
-          ]
+        enterpriseName: [
+          {required: true, message: '请输入公司名称', trigger: 'blur'},
+          {min: 3, max: 50, message: '机构名称长度在 3 到 50 个字符', trigger: 'blur'}
+        ],
+        businessLicensePhoto: [
+          {
+            validator: (rule, value, callback) => {
+              console.log(value)
+              if (value == null || value == '') {
+                callback(new Error('公司营业执照不能为空'))
+              } else {
+                callback()
+              }
+            },
+            trigger: 'blue'
+          },
+        ],
+        legalPersonName: [
+          {required: true, message: '请输入公司法人姓名', trigger: 'blur'}
+        ],
+        bankAccount: [
+          {required: true, message: '请输入对公账户', trigger: 'blur'},
+          {
+            validator: (rule, value, callback) => {
+              if (!this.checkNumber(value)) {
+                callback(new Error('对公账户输入有误'))
+              } else {
+                callback()
+              }
+            },
+            trigger: 'blur'
+          },
+        ],
+        unifiedSocialCreditCode: [
+          {required: true, message: '请输入统一社会信用代码', trigger: 'blur'},
+          {
+            validator: (rule, value, callback) => {
+              if (!this.checkNumberAndWord(value)) {
+                callback(new Error('统一社会信用代码输入有误'))
+              } else {
+                callback()
+              }
+            }, trigger: 'blur'
+          },
+        ],
+        address: [
+          {required: true, message: '请输入公司地址', trigger: 'blur'}
+        ]
       }
     }
   },
@@ -154,22 +154,22 @@ export default {
     submitInfo () {
       //this.isModifyMode = false
       this.$refs['authentication'].validate(valid => {
-          if (valid) {
-              this.showLoading()
-              const newAuthentication = {
-                  userId: this.user.userVO.id,
-                  enterpriseName: this.authentication.enterpriseName,
-                  legalPersonName: this.authentication.legalPersonName,
-                  businessLicensePhoto: this.authentication.businessLicensePhoto,
-                  unifiedSocialCreditCode: this.authentication.unifiedSocialCreditCode,
-                  bankAccount: this.authentication.bankAccount,
-                  address: this.authentication.address,
-              }
-              uploadEnterpriseAuthenticationInfo(this.user.userVO.id, newAuthentication, this.submitInfoSuccess, this.submitInfoFail)
-          } else {
-              notify('error', '表单填写错误!')
-              return false
+        if (valid) {
+          this.showLoading()
+          const newAuthentication = {
+            userId: this.user.userVO.id,
+            enterpriseName: this.authentication.enterpriseName,
+            legalPersonName: this.authentication.legalPersonName,
+            businessLicensePhoto: this.authentication.businessLicensePhoto,
+            unifiedSocialCreditCode: this.authentication.unifiedSocialCreditCode,
+            bankAccount: this.authentication.bankAccount,
+            address: this.authentication.address,
           }
+          uploadEnterpriseAuthenticationInfo(this.user.userVO.id, newAuthentication, this.submitInfoSuccess, this.submitInfoFail)
+        } else {
+          notify('error', '表单填写错误!')
+          return false
+        }
       })
     },
     submitInfoSuccess (res) {
@@ -183,20 +183,22 @@ export default {
         storageSave('rolesPermissions', getRolesPermissions(res.roleList))
         this.hideLoading()
         //notify('success', '用户信息刷新成功')
-        this.$confirm('认证信息提交成功,将于10个工作日内审核完成')
-          .then(_ => {
-            //done()
-            this.$router.push({
-              name: 'EnterpriseAuthentication',
-              params: {userId: this.user.userVO.id}
-            })
-          })
-          .catch(_ => {
+        this.$alert('认证信息提交成功,将于3个工作日内审核完成', '提交成功', {
+          confirmButtonText: '确定',
+          callback: action => {
             this.$router.push({
               name: 'EnterpriseAuthentication',
               params: {userId: this.user.userVO.id}
             })
-          })
+          }
+        });
+
+        // .catch(_ => {
+        //   this.$router.push({
+        //     name: 'EnterpriseAuthentication',
+        //     params: {userId: this.user.userVO.id}
+        //   })
+        // })
       }).catch((error) => {
         this.hideLoading()
         notify('error', '重新获取用户信息失败:' + error.data)
@@ -232,7 +234,7 @@ export default {
     },
     //上传文件,此处为上传图片
     uploadFile (param) {
-      this.showLoading();
+      this.showLoading()
       const formData = new FormData()
       let config = {
         //添加请求头
@@ -240,14 +242,14 @@ export default {
       }
       formData.append('file', param.file)
       Http.upload(Apis.FILE.UPLOAD_IMAGE.replace('{userId}', this.user.userVO.id), formData, config).then((res) => {
-        this.hideLoading();
+        this.hideLoading()
         console.log('上传成功')
         this.authentication.businessLicensePhoto = res.data
         console.log(res.data)
         notify('success', '上传成功')
-        this.$refs['authentication'].validateField('businessLicensePhoto');
+        this.$refs['authentication'].validateField('businessLicensePhoto')
       }).catch(error => {
-        this.hideLoading();
+        this.hideLoading()
         notify('error', error.data)
       })
     },
@@ -268,11 +270,11 @@ export default {
     sendBusMessage () {
       this.$root.$emit('user', this.user)
     },
-    checkNumber(value){
-       return /^\d+$/.test(value);
+    checkNumber (value) {
+      return /^\d+$/.test(value)
     },
-    checkNumberAndWord(value){
-        return /^[^_IOZSVa-z\W]{2}\d{6}[^_IOZSVa-z\W]{10}$/g.test(value) || /^[A-Za-z0-9]\w{14}$/g.test(value);
+    checkNumberAndWord (value) {
+      return /^[^_IOZSVa-z\W]{2}\d{6}[^_IOZSVa-z\W]{10}$/g.test(value) || /^[A-Za-z0-9]\w{14}$/g.test(value)
     }
   },
 }

+ 5 - 12
src/components/authen/IndividualAuthenticationCreate.vue

@@ -170,22 +170,15 @@ export default {
         this.hideLoading()
         //notify('success', '用户信息刷新成功')
         this.sendBusMessage()
-        this.$confirm('认证信息提交成功,将于10个工作日内审核完成')
-          .then(_ => {
-            //done()
-
-            this.$router.push({
-              name: 'IndividualAuthentication',
-              params: {userId: this.user.userVO.id}
-            })
-            this.hideDialog()
-          })
-          .catch(_ => {
+        this.$alert('认证信息提交成功,将于3个工作日内审核完成', '提交成功', {
+          confirmButtonText: '确定',
+          callback: action => {
             this.$router.push({
               name: 'IndividualAuthentication',
               params: {userId: this.user.userVO.id}
             })
-          })
+          }
+        });
       }).catch((error) => {
         this.hideLoading()
         notify('error', '重新获取用户信息失败:' + error.data)