Forráskód Böngészése

禅道问题修复

刘湘琪 2 éve%!(EXTRA string=óta)
szülő
commit
bd60547d9f

+ 28 - 24
src/views/enterprise/ent/edit.vue

@@ -786,15 +786,6 @@ export default {
     },
     handleRegister() {
       this.form.mainProducts = this.form.mainProductArray.join(',')
-      if(this.form.license) {
-        validLicenseApi(this.form.license).then(res => {
-          // true存在
-          if(res.data) {
-            this.$message.error('统一社会信用代码已经存在,不可以重复注册');
-            return
-          }
-        })
-      }
       if(this.type == 'update') {
         this.$refs.form.validate((valid, obj) => {
           if (valid) {
@@ -827,24 +818,37 @@ export default {
         }
         });
       }else if(this.type == 'add'){
+
         this.$refs.form.validate((valid, obj) => {
           if (valid) {
             this.loading = true;
-            registerEnterUserApi(this.form).then(res => {
-              const userName = this.form.userName;
-              this.$notify.success({
-                title: '系统提示',
-                message: '恭喜你,您的账号注册成功!',
-                showClose: false,
-                duration: 2000
-              });
-              setTimeout(() => {
-                this.$store.dispatch("tagsView/delView", this.$route);
-                this.$router.go(-1);
-              }, 2000);
-            }).catch(() => {
-              this.loading = false;
-            })
+            if(this.form.license) {
+              validLicenseApi(this.form.license).then(res => {
+                // true存在
+                if(res.data) {
+                  this.$message.error('统一社会信用代码已经存在,不可以重复注册');
+                  this.loading = false;
+                  return false
+                }else {
+                  registerEnterUserApi(this.form).then(res => {
+                    const userName = this.form.userName;
+                    this.$notify.success({
+                      title: '系统提示',
+                      message: '恭喜你,您的账号注册成功!',
+                      showClose: false,
+                      duration: 2000
+                    });
+                    setTimeout(() => {
+                      this.$store.dispatch("tagsView/delView", this.$route);
+                      this.$router.go(-1);
+                    }, 2000);
+                  }).catch(() => {
+                    this.loading = false;
+                  })
+                }
+              })
+            }
+
           }else {
             const a = []
             for (let key in obj) {

+ 8 - 3
src/views/enterprise/project/components/FinDataEnclosure.vue

@@ -13,7 +13,7 @@
       <el-table-column label="文件名称" prop="fileName" align="center"></el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <el-button type="text" @click="handleView(scope.row)">查看</el-button>
+          <el-button type="text" @click="handleView(scope.row)">预览打印</el-button>
           <el-button type="text" @click="handleDownload(scope.row)">下载</el-button>
           <el-button type="text" @click="handleDelete(scope.row)" v-if="userType == 'ENT_FIN' || userType == 'ENT_ADMIN_FIN'">删除</el-button>
         </template>
@@ -102,8 +102,13 @@
         	})
         })
       },
-      handleView() {
-
+      // 从url加载
+      handleView(row) {
+        let routeUrl = this.$router.resolve({
+          path: '/enclosurePreview',
+          query: {url: row.url,fileName: row.fileName,id: row.id}
+        });
+        window.open(routeUrl.href, "_blank");
       },
       handleDelete(row) {
         const id = row.id;

+ 1 - 1
src/views/enterprise/project/components/TechEnclosure.vue

@@ -2,7 +2,7 @@
   <div class="app-container">
     <h3 class="toolbar">
       <div class="tool">
-        <el-button type="primary" plain icon="el-icon-upload2" size="mini" @click="handleUpload" v-if="userType == 'ENT_TECH' || userType == 'ENT_ADMIN_TECH'" v-hasRole="['ENT_ADMIN_TECH','ENT_TECH']">一键上传</el-button>
+        <el-button type="primary" plain icon="el-icon-upload2" size="mini" @click="handleUpload" v-if="userType == 'ENT_TECH' || userType == 'ENT_ADMIN_TECH'">一键上传</el-button>
         <el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleDownloadBatch">批量下载</el-button>
         <el-button type="primary" plain icon="el-icon-delete" size="mini" @click="handleBatchDelte" v-if="userType == 'ENT_TECH' || userType == 'ENT_ADMIN_TECH'">批量删除</el-button>
       </div>