ソースを参照

禅道问题修复

刘湘琪 2 年 前
コミット
a3c6cef265
共有2 個のファイルを変更した23 個の追加16 個の削除を含む
  1. 2 1
      src/api/admin/ent/ent.js
  2. 21 15
      src/views/enterprise/ent/edit.vue

+ 2 - 1
src/api/admin/ent/ent.js

@@ -58,11 +58,12 @@ export function stopEntUserApi(id, data) {
 //启用
 export function enableEntUserApi(id, data) {
   return request({
-    url: `/enable/${id}`,
+    url: `/admin/enterprise/enable/${id}`,
     method: 'put',
     data: data
   })
 }
+
 //修改企业名称
 export function updateEntInfoApi(data) {
   return request({

+ 21 - 15
src/views/enterprise/ent/edit.vue

@@ -344,7 +344,7 @@
             <el-button :loading="loading" size="medium" type="primary" @click.native.prevent="handleRegister" style="width: 100px;">
               提交
             </el-button>
-            <el-button size="medium" type="primary" style="width: 100px;">取消</el-button>
+            <el-button size="medium" type="primary" style="width: 100px;" @click="cancel">取消</el-button>
           </el-form-item>
         </el-col>
       </el-row>
@@ -527,7 +527,6 @@ export default {
           { required: true, trigger: "change", message: "请选择是否做加计扣除" },
         ],
         licensePath: [
-          // { validator: validateLicense, trigger: "change"}
           { required: true, trigger: "change", message: "请上传营业执照附件" },
         ],
         logo: [
@@ -676,6 +675,10 @@ export default {
       // a.href = row.url;
       // a.click();
     },
+    cancel() {
+      this.$store.dispatch("tagsView/delView", this.$route);
+      this.$router.go(-1);
+    },
     handleRegister() {
       this.form.mainProducts = this.form.mainProductArray.join(',')
       if(this.type == 'update') {
@@ -684,34 +687,37 @@ export default {
             this.loading = true;
             updateEntInfoApi(this.form).then(res => {
               const userName = this.form.userName;
-              this.$alert("<font color='red'>信息修改成功!</font>", '系统提示', {
-                dangerouslyUseHTMLString: true,
-                type: 'success'
-              }).then(() => {
+              this.$notify.success({
+                title: '系统提示',
+                message: '信息修改成功!',
+                showClose: false,
+                duration: 2000
+              });
+              setTimeout(() => {
                 this.$store.dispatch("tagsView/delView", this.$route);
                 this.$router.go(-1);
-              }).catch(() => {});
+              }, 2000);
             }).catch(() => {
               this.loading = false;
             })
           }
         });
       }else if(this.type == 'add'){
-        // if(this.form.logo == undefined) {
-        //   this.$message.error('请上传文件水印');
-        // }
         this.$refs.form.validate(valid => {
           if (valid) {
             this.loading = true;
             registerEnterUserApi(this.form).then(res => {
               const userName = this.form.userName;
-              this.$alert("<font color='red'>恭喜你,您的账号 " + userName + " 注册成功!</font>", '系统提示', {
-                dangerouslyUseHTMLString: true,
-                type: 'success'
-              }).then(() => {
+              this.$notify.success({
+                title: '系统提示',
+                message: '恭喜你,您的账号注册成功!',
+                showClose: false,
+                duration: 2000
+              });
+              setTimeout(() => {
                 this.$store.dispatch("tagsView/delView", this.$route);
                 this.$router.go(-1);
-              }).catch(() => {});
+              }, 2000);
             }).catch(() => {
               this.loading = false;
             })