Bladeren bron

页面信息提交

刘湘琪 2 jaren geleden
bovenliggende
commit
65665a6f8c

+ 2 - 2
.env.development

@@ -1,11 +1,11 @@
 # 页面标题
-VUE_APP_TITLE = 云创征信管理系统
+VUE_APP_TITLE = 企业研发归集系统
 
 # 开发环境配置
 ENV = 'development'
 
 # 管理系统/开发环境
-VUE_APP_BASE_API = '/'
+VUE_APP_BASE_API = '/api'
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 3 - 2
.env.production

@@ -1,8 +1,9 @@
 # 页面标题
-VUE_APP_TITLE = 云创征信管理系统
+VUE_APP_TITLE = 企业研发归集系统
 
 # 生产环境配置
 ENV = 'production'
 
 # 管理系统/生产环境
-VUE_APP_BASE_API = '/prod-api'
+# VUE_APP_BASE_API = '/prod-api'
+VUE_APP_BASE_API = '/api'

+ 1 - 1
.env.staging

@@ -1,5 +1,5 @@
 # 页面标题
-VUE_APP_TITLE = 云创征信管理系统
+VUE_APP_TITLE = 企业研发归集系统
 
 NODE_ENV = production
 

+ 32 - 0
src/api/admin/ent/ent.js

@@ -31,3 +31,35 @@ export function auditEntApi(data) {
     data: data
   })
 }
+//重置密码
+export function resetPwdApi(id,data) {
+  return request({
+    url: `/admin/enterprise/resetPwd/${id}`,
+    method: 'put',
+    data: data
+  })
+}
+//提醒
+export function remindUserApi(id, data) {
+  return request({
+    url: `/admin/enterprise/remind/${id}`,
+    method: 'put',
+    data: data
+  })
+}
+//停用
+export function stopEntUserApi(id, data) {
+  return request({
+    url: `/admin/enterprise/stop/${id}`,
+    method: 'put',
+    data: data
+  })
+}
+//修改企业名称
+export function updateEntInfoApi(data) {
+  return request({
+    url: `/admin/enterprise/update`,
+    method: 'put',
+    data: data
+  })
+}

+ 10 - 0
src/api/enterprise/declare/declare.js

@@ -0,0 +1,10 @@
+import request from '@/utils/request'
+
+// 查询项目列表
+export function listDeclareApi(query) {
+  return request({
+    url: '/ent/project/reportList',
+    method: 'get',
+    params: query
+  })
+}

+ 0 - 0
src/api/enterprise/ent/ent.js


+ 4 - 8
src/components/ImageUpload/index.vue

@@ -1,7 +1,6 @@
 <template>
   <div class="component-upload-image">
     <el-upload
-      multiple
       :action="uploadImgUrl"
       list-type="picture-card"
       :on-success="handleUploadSuccess"
@@ -19,7 +18,7 @@
     >
       <i class="el-icon-plus"></i>
     </el-upload>
-    
+
     <!-- 上传提示 -->
     <div class="el-upload__tip" slot="tip" v-if="showTip">
       请上传
@@ -32,12 +31,10 @@
       :visible.sync="dialogVisible"
       title="预览"
       width="800"
-      append-to-body
-    >
+      append-to-body>
       <img
         :src="dialogImageUrl"
-        style="display: block; max-width: 100%; margin: 0 auto"
-      />
+        style="display: block; max-width: 100%; margin: 0 auto"/>
     </el-dialog>
   </div>
 </template>
@@ -127,7 +124,7 @@ export default {
     },
     // 上传成功回调
     handleUploadSuccess(res) {
-      this.uploadList.push({ name: res.fileName, url: res.fileName });
+      this.uploadList.push({ name: res.data.fileName, url: res.data.url });
       if (this.uploadList.length === this.number) {
         this.fileList = this.fileList.concat(this.uploadList);
         this.uploadList = [];
@@ -209,4 +206,3 @@ export default {
     transform: translateY(0);
 }
 </style>
-

+ 49 - 26
src/views/common/registerFirst.vue

@@ -295,10 +295,17 @@
           </el-form-item>
         </el-collapse-item>
         <el-collapse-item title="文件水印" name="11">
+          <el-row :gutter="40">
+            <el-col :span="24">
+              <el-form-item label="文件水印" prop="logo">
+                <ImageUpload @input="handleLogoSuccess"></ImageUpload>
+              </el-form-item>
+            </el-col>
+          </el-row>
         </el-collapse-item>
         <el-collapse-item title="服务时间" name="12">
           <el-form-item label="服务时间段" prop="serviceDate">
-            <el-date-picker v-model="serviceDate" placeholder="选择日期" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
+            <el-date-picker v-model="registerForm.serviceDate" placeholder="选择日期" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
           </el-form-item>
         </el-collapse-item>
       </el-collapse>
@@ -310,7 +317,7 @@
               size="medium"
               type="primary"
               @click.native.prevent="handleRegister" style="width: 100px;">
-              <span v-if="!loading">下一步</span>
+              <span v-if="!loading">注册</span>
               <span v-else>注 册 中...</span>
             </el-button>
             <el-button size="medium" type="primary" style="width: 100px;">取消</el-button>
@@ -332,11 +339,13 @@ import { getCodeImg, registerEntApi } from "@/api/login";
 import {getProvinceDataApi,getRegionChildrenApi} from "@/api/common/common"
 import { regTypeOptions,mainProductsOptions,signatoriesOptions } from "@/utils/dataFormat"
 import FileUpload from '@/components/FileUpload'
+import ImageUpload from '@/components/ImageUpload'
 
 export default {
   name: "First",
   components: {
-    FileUpload
+    FileUpload,
+    ImageUpload
   },
   data() {
     const equalToPassword = (rule, value, callback) => {
@@ -348,7 +357,6 @@ export default {
     };
     return {
       activeName: '1',
-      serviceDate: [],
       provinceName: '',
       cityName: '',
       districtName: '',
@@ -360,6 +368,7 @@ export default {
       cityDataList: [],
       districtDataList: [],
       registerForm: {
+        serviceDate: [],
         startDate: '',
         endDate: '',
         attachIds: [],
@@ -368,14 +377,12 @@ export default {
         districtId: '',
         mainProductArray: [],
         mainProducts: '',
-        username: "",
+        userName: "",
         password: "",
-        confirmPassword: "",
-        code: "",
-        // uuid: ""
+        confirmPassword: ""
       },
       registerRules: {
-        username: [
+        userName: [
           { required: true, trigger: "blur", message: "请输入您的账号" },
           { min: 2, max: 20, message: '用户账号长度必须介于 2 和 20 之间', trigger: 'blur' }
         ],
@@ -399,7 +406,6 @@ export default {
   },
   methods: {
     handleSuccess(file) {
-      console.log(file)
       this.registerForm.licensePath = file.url;
       this.registerForm.fileName = file.name;
     },
@@ -408,6 +414,9 @@ export default {
         this.registerForm.attachIds.push(item.response.data.id)
       });
     },
+    handleLogoSuccess(file) {
+      this.registerForm.logo = file
+    },
     //选择省份
     getCityData() {
       this.registerForm.cityId = ''
@@ -415,6 +424,12 @@ export default {
       getRegionChildrenApi(this.registerForm.provinceId).then(res => {
         if(res.code == 200) {
           this.cityDataList = res.data
+
+          let obj = this.provinceDataList.find(item => {
+            return item.id == this.registerForm.provinceId
+          })
+          this.provinceName = obj.name
+          this.registerForm.taxOffice = '国家税务总局'+this.provinceName+'税务局'
         }
       })
     },
@@ -424,9 +439,22 @@ export default {
       getRegionChildrenApi(this.registerForm.cityId).then(res => {
         if(res.code == 200) {
           this.districtDataList = res.data
+
+          let obj = this.cityDataList.find(item => {
+            return item.id == this.registerForm.cityId
+          })
+          this.cityName = obj.name
+          this.registerForm.taxOffice = '国家税务总局'+this.cityName+'税务局'
         }
       })
     },
+    changeDistrict() {
+      let obj = this.districtDataList.find(item => {
+        return item.id == this.registerForm.districtId
+      })
+      this.districtName = obj.name
+      this.registerForm.taxOffice = '国家税务总局'+this.districtName+'税务局'
+    },
     getProvinceData() {
       getProvinceDataApi().then(res => {
         if(res.code == 200) {
@@ -449,8 +477,8 @@ export default {
         if (valid) {
           this.loading = true;
           registerEntApi(this.registerForm).then(res => {
-            const username = this.registerForm.username;
-            this.$alert("<font color='red'>恭喜你,您的账号 " + username + " 注册成功!</font>", '系统提示', {
+            const userName = this.registerForm.userName;
+            this.$alert("<font color='red'>恭喜你,您的账号 " + userName + " 注册成功!</font>", '系统提示', {
               dangerouslyUseHTMLString: true,
               type: 'success'
             }).then(() => {
@@ -467,22 +495,17 @@ export default {
     }
   },
   watch: {
-    'registerForm.provinceId' (val) {
-    	if (this.registerForm.provinceId) {
-    		let obj = this.provinceDataList.find(item => {
-          return item.id == this.registerForm.provinceId
-        })
-        this.provinceName = obj.name
-        this.registerForm.taxOffice = '国家税务总局'+this.provinceName+'税务局'
-    	}
-    },
-    'resetForm.serviceDate'(val) {
-      if(this.serviceDate) {
-        this.resetForm.startDate = this.serviceDate[0]
-        this.registerForm.endDate = this.servideDate[1]
+    'registerForm.serviceDate'(val) {
+      if(this.registerForm.serviceDate.length > 0) {
+        console.log("!!!!!!!!!!!!!!")
+        this.registerForm.startDate = this.registerForm.serviceDate[0]
+        this.registerForm.endDate = this.registerForm.serviceDate[1]
+      }else {
+        this.registerForm.startDate = ''
+        this.registerForm.endDate = ''
       }
     }
-   }
+  }
 };
 </script>
 

+ 7 - 2
src/views/components/login/index.vue

@@ -48,7 +48,7 @@
           <span v-if="!loading">登 录</span>
           <span v-else>登 录 中...</span>
         </el-button>
-        <div v-if="register">
+        <div v-if="loginType == 'entUser'">
           <div style="float: left;">
             <router-link class="link-type" :to="'/registerFirst'">立即注册</router-link>
           </div>
@@ -67,7 +67,12 @@ import Cookies from "js-cookie";
 import { encrypt, decrypt } from '@/utils/jsencrypt'
 
 export default {
-  name: "Login",
+  name: "Login",
+  props: {
+    loginType: {
+      type: String
+    }
+  },
   data() {
     return {
       codeUrl: "",

+ 6 - 35
src/views/enterprise/declare/index.vue

@@ -31,12 +31,6 @@
       <el-form-item label="项目名称">
         <el-input v-model="queryParams.projectName" style="width: 200px;"></el-input>
       </el-form-item>
-      <el-form-item label="服务状态">
-        <el-select v-model="queryParams.entState" style="width: 200px;">
-          <el-option v-for="(item, index) in entStateOptions" :key="index" :label="item.dictLabel" :value="item.dictValue"></el-option>
-        </el-select>
-      </el-form-item>
-
       <el-form-item>
         <el-button type="primary" @click="handleQuery">搜索</el-button>
         <el-button @click="resetQuery">重置</el-button>
@@ -45,12 +39,8 @@
     <h3 class="toolbar">
       <span class="title">列表</span>
       <div class="tool">
-        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
-        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">批量新增</el-button>
-        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">模板下载</el-button>
-        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">一键上传</el-button>
-        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">下载</el-button>
-        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">批量删除</el-button>
+        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleBatchDel">批量删除</el-button>
+        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleBatchDow">批量下载</el-button>
       </div>
     </h3>
     <el-table v-loading="loading" :data="list" border>
@@ -62,23 +52,11 @@
       <el-table-column label="项目跨年" prop="overYearFlag" align="center" width="120"></el-table-column>
       <el-table-column label="创建时间" align="center" prop="createTime" width="150"></el-table-column>
       <el-table-column label="留存备查时间" prop="linkMobile" align="center" width="120"></el-table-column>
-      <el-table-column label="资料完善度" prop="linkEmail" align="center" width="120"></el-table-column>
-      <el-table-column label="负责状态" prop="createTime" align="center" width="160"></el-table-column>
-      <el-table-column label="项目状态" align="center" width="120">
-      </el-table-column>
       <el-table-column label="操作" align="center" width="180" 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="handleAudit(scope.row)" v-if="scope.row.authState == '1'">审核</el-button>
-          <template v-if="scope.row.authState == '2'">
-            <el-button type="text" @click="handleUpdate(scope.row)">修改</el-button>
-            <el-button type="text" @click="handleStop(scope.row)">停用</el-button>
-            <el-button type="text" @click="handleRemind(scope.row)">提醒</el-button>
-          </template>
-          <template v-if="scope.row.authState == '2' || scope.row.authState == '1'">
-            <el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
-            <el-button type="text" @click="handleRePwd(scope.row)">重置密码</el-button>
-          </template>
+          <el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
+          <el-button type="text" @click="handleDownload(scope.row)">下载</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -95,15 +73,9 @@
 
 <script>
   import {getProvinceDataApi,getRegionChildrenApi} from "@/api/common/common"
-  import {listProjectApi, deleteEntApi} from '@/api/enterprise/project/project'
+  import {listDeclareApi} from '@/api/enterprise/declare/declare'
   import {entStateOptions, getLabel, authStateOptions} from '@/utils/dataFormat'
-  // import Audit from './components/audit'
-  // import Info from './components/info'
   export default {
-    components: {
-      // Audit,
-      // Info
-    },
     data () {
       return {
         loading: false,
@@ -161,7 +133,7 @@
       },
       getList() {
         this.loading = true;
-        listProjectApi(this.queryParams).then(response => {
+        listDeclareApi(this.queryParams).then(response => {
           this.list = response.data.records;
           this.total = response.data.total;
           this.loading = false;
@@ -179,7 +151,6 @@
       },
       // 查看
       handleView(row) {
-        this.$router.push("/ent/info/"+row.id+'?type=view')
       },
       handleDelete(row) {
         const id = row.id;

+ 390 - 369
src/views/enterprise/ent/edit.vue

@@ -1,346 +1,339 @@
 <template>
   <div class="app-container" v-loading="loading">
-    <el-form ref="form" :model="form" :rules="registerRules" label-width="170px">
-      <h3 class="toolbar">
-        <span class="title">账户信息</span>
-      </h3>
-          <el-row :gutter="40">
-            <el-col :span="12">
-              <el-form-item label="账户名称" prop="userName">
-                <el-input v-model="form.userName" type="text" auto-complete="off" placeholder="账号">
-                </el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="密码" prop="password">
-                <el-input
-                  v-model="form.password"
-                  type="password"
-                  auto-complete="new-password"
-                  placeholder="密码">
-                </el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="确认密码" prop="confirmPassword">
-                <el-input
-                  v-model="form.confirmPassword"
-                  type="password"
-                  auto-complete="new-password"
-                  placeholder="确认密码">
-                </el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <h3 class="toolbar">
-            <span class="title">账户联系人信息</span>
-          </h3>
-
-          <el-row :gutter="40">
-            <el-col :span="12">
-              <el-form-item label="姓名" prop="nickName">
-                <el-input v-model="form.nickName" type="text" auto-complete="off" placeholder="姓名">
-                </el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="手机号码" prop="phonenumber">
-                <el-input v-model="form.phonenumber" type="text" auto-complete="off" placeholder="手机号码">
-                </el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="邮箱地址" prop="email">
-                <el-input v-model="form.email" type="text" auto-complete="off" placeholder="邮箱地址">
-                </el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <h3 class="toolbar">
-            <span class="title">企业信息</span>
-          </h3>
-
-          <el-row :gutter="40">
-            <el-col :span="12">
-              <el-form-item label="企业名称" prop="entName">
-                <el-input v-model="form.entName" type="text" auto-complete="off" placeholder="请输入企业名称">
-                </el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="统一社会信用代码" prop="license">
-                <el-input type="text"
-                  v-model="form.license"
-                  placeholder="请输入统一社会信用代码">
-                </el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="注册资金" prop="regCapital">
-                <el-input type="text"
-                  v-model="form.regCapital"
-                  placeholder="请输入注册资金">
-                </el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="工商注册时间" prop="regDate">
-                <el-date-picker v-model="form.regDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd"></el-date-picker>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="工商注册类型" prop="regType">
-                <el-select v-model="form.regType" filterable>
-                  <el-option v-for="item in regTypeOptions" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="24">
-              <el-form-item label="主营产品(服务)所属技术领域" prop="mainProductArray">
-                <el-checkbox-group v-model="form.mainProductArray">
-                  <el-checkbox v-for="(item, index) in mainProductsOptions" :label="item.dictLabel" :key="index">{{item.dictLabel}}</el-checkbox>
-                </el-checkbox-group>
-
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="通信地址" prop="address">
-                <el-input v-model="form.address" type="text" auto-complete="off" placeholder="请输入通信地址">
-                </el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="邮政编码" prop="zipCode">
-                <el-input v-model="form.zipCode" type="text" auto-complete="off" placeholder="请输入邮政编码">
-                </el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="企业所属行政区域" prop="provinceId">
-                <el-select v-model="form.provinceId" placeholder="省" @change="getCityData" style="width: 220px;" filterable>
-                  <el-option v-for="(item,index) in provinceDataList" :key="index" :label="item.name" :value="item.id"></el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="7">
-              <el-form-item prop="cityId" label-width="60px">
-                <el-select v-model="form.cityId" placeholder="市" @change="getDistrictData" style="width: 220px;" filterable>
-                  <el-option v-for="(item, index) in cityDataList" :key="index" :label="item.name" :value="item.id"></el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label-width="0px" prop="districtId">
-                <el-select v-model="form.districtId" placeholder="区" style="width: 220px;" filterable>
-                  <el-option v-for="(item, index) in districtDataList" :key="index" :label="item.name" :value="item.id"></el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="企业所得税主管税务机关" prop="taxOffice">
-                <el-input v-model="form.taxOffice" type="text" auto-complete="off" placeholder="请输入企业所得税主管税务机关">
-                </el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <h3 class="toolbar">
-            <span class="title">法人信息</span>
-          </h3>
-
-          <el-row :gutter="40">
-            <el-col :span="12">
-              <el-form-item label="姓名" prop="legalName">
-                <el-input v-model="form.legalName" type="text" auto-complete="off" placeholder="请输入法人姓名">
-                </el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="身份证号码" prop="legalIdCard">
-                <el-input v-model="form.legalIdCard" type="text" auto-complete="off" placeholder="请输入法人身份证号码">
-                </el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="手机号码" prop="legalMobile">
-                <el-input v-model="form.legalMobile" type="text" auto-complete="off" placeholder="手机号码">
-                </el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="固定电话" prop="legalPhone">
-                <el-input v-model="form.legalPhone" type="text" auto-complete="off" placeholder="请输入固定电话">
-                </el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="传真" prop="legalFax">
-                <el-input v-model="form.legalFax" type="text" auto-complete="off" placeholder="请输入法人传真">
-                </el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="E-mail" prop="legalEmail">
-                <el-input v-model="form.legalEmail" type="text" auto-complete="off" placeholder="请输入法人邮箱">
-                </el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
-        <h3 class="toolbar">
-          <span class="title">联系人信息</span>
-        </h3>
-
-          <el-row :gutter="40">
-            <el-col :span="12">
-              <el-form-item label="姓名" prop="linkName">
-                <el-input v-model="form.linkName" type="text" auto-complete="off" placeholder="请输入联系人姓名">
-                </el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="身份证号码" prop="linkIdCard">
-                <el-input v-model="form.linkIdCard" type="text" auto-complete="off" placeholder="请输入联系人身份证号码">
-                </el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="手机号码" prop="linkMobile">
-                <el-input v-model="form.linkMobile" type="text" auto-complete="off" placeholder="请填入手机号码">
-                </el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="固定电话" prop="linkPhone">
-                <el-input v-model="form.linkPhone" type="text" auto-complete="off" placeholder="请输入联系人固定电话">
-                </el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="传真" prop="linkFax">
-                <el-input v-model="form.linkFax" type="text" auto-complete="off" placeholder="请输入联系人传真">
-                </el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="E-mail" prop="linkEmail">
-                <el-input v-model="form.linkEmail" type="text" auto-complete="off" placeholder="请输入联系人邮箱">
-                </el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
-        <h3 class="toolbar">
-          <span class="title">企业上市信息</span>
-        </h3>
-
-          <el-row :gutter="40">
-            <el-col :span="12">
-              <el-form-item label="企业是否上市" prop="listedFlag">
-                <el-radio-group v-model="form.listedFlag">
-                  <el-radio label="1">是</el-radio>
-                  <el-radio label="0">否</el-radio>
-                </el-radio-group>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="企业上市代码" prop="listingCode">
-                <el-input v-model="form.listingCode" type="text" auto-complete="off" placeholder="请输入企业上市代码">
-                </el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
-        <h3 class="toolbar">
-          <span class="title">风险投资信息</span>
-        </h3>
-
-          <el-row :gutter="40">
-            <el-col :span="12">
-              <el-form-item label="是否引入风险投资" prop="investFlag">
-                <el-radio-group v-model="form.investFlag">
-                  <el-radio label="1">是</el-radio>
-                  <el-radio label="0">否</el-radio>
-                </el-radio-group>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="风险投资金额" prop="investCapital">
-                <el-input v-model="form.investCapital" type="text" auto-complete="off" placeholder="请输入风险投资金额">
-                </el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
-        <h3 class="toolbar">
-          <span class="title">高新企业</span>
-        </h3>
-
-          <el-row :gutter="40">
-            <el-col :span="12">
-              <el-form-item label="是否为高新企业" prop="techFlag">
-                <el-radio-group v-model="form.techFlag">
-                  <el-radio label="1">是</el-radio>
-                  <el-radio label="0">否</el-radio>
-                </el-radio-group>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="高新企业编号" prop="techCode">
-                <el-input v-model="form.techCode" type="text" auto-complete="off" placeholder="请输入高新企业编号">
-                </el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
-        <h3 class="toolbar">
-          <span class="title">上年度是否做加计扣除</span>
-        </h3>
-
-          <el-row :gutter="40">
-            <el-col :span="12">
-              <el-form-item label="上年度是否做加计扣除" prop="deductionFlag">
-                <el-radio-group v-model="form.deductionFlag">
-                  <el-radio label="1">是</el-radio>
-                  <el-radio label="0">否</el-radio>
-                </el-radio-group>
-              </el-form-item>
-            </el-col>
-          </el-row>
+    <el-form ref="form" :model="form" :rules="registerRules" label-width="170px">
+      <template v-if="type == 'add'">
         <h3 class="toolbar">
-          <span class="title">附件</span>
-        </h3>
-
-          <el-form-item label="企业营业执照" prop="licensePath">
-            <FileUpload :file="{url: form.licensePath, name: form.fileName}" @input="handleSuccess">上传材料</FileUpload>
-          </el-form-item>
-          <el-form-item label="其他附件" prop="attachIds">
-            <FileUpload :files="form.attachIds" @input="handleSaleSuccess" :multiple="true">上传材料</FileUpload>
-          </el-form-item>
-        <h3 class="toolbar">
-          <span class="title">文件水印</span>
+          <span class="title">账户信息</span>
         </h3>
         <el-row :gutter="40">
-          <el-col :span="24">
-            <el-form-item label="文件水印" prop="serviceDate">
-              <ImageUpload></ImageUpload>
+          <el-col :span="12">
+            <el-form-item label="账户名称" prop="userName">
+              <el-input v-model="form.userName" type="text" auto-complete="off" placeholder="账号">
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="密码" prop="password">
+              <el-input
+                v-model="form.password"
+                type="password"
+                auto-complete="new-password"
+                placeholder="密码">
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="确认密码" prop="confirmPassword">
+              <el-input
+                v-model="form.confirmPassword"
+                type="password"
+                auto-complete="new-password"
+                placeholder="确认密码">
+              </el-input>
             </el-form-item>
           </el-col>
         </el-row>
         <h3 class="toolbar">
-          <span class="title">服务时间</span>
+          <span class="title">账户联系人信息</span>
         </h3>
         <el-row :gutter="40">
-          <el-col :span="24">
-            <el-form-item label="服务时间段" prop="serviceDate">
-              <el-date-picker v-model="form.serviceDate" placeholder="选择日期" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
+          <el-col :span="12">
+            <el-form-item label="姓名" prop="nickName">
+              <el-input v-model="form.nickName" type="text" auto-complete="off" placeholder="姓名">
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="手机号码" prop="phonenumber">
+              <el-input v-model="form.phonenumber" type="text" auto-complete="off" placeholder="手机号码">
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="邮箱地址" prop="email">
+              <el-input v-model="form.email" type="text" auto-complete="off" placeholder="邮箱地址">
+              </el-input>
             </el-form-item>
           </el-col>
         </el-row>
+      </template>
+      <h3 class="toolbar">
+        <span class="title">企业信息</span>
+      </h3>
+      <el-row :gutter="40">
+        <el-col :span="12">
+          <el-form-item label="企业名称" prop="entName">
+            <el-input v-model="form.entName" type="text" auto-complete="off" placeholder="请输入企业名称">
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="统一社会信用代码" prop="license">
+            <el-input type="text"
+              v-model="form.license"
+              placeholder="请输入统一社会信用代码">
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="注册资金" prop="regCapital">
+            <el-input type="text"
+              v-model="form.regCapital"
+              placeholder="请输入注册资金">
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="工商注册时间" prop="regDate">
+            <el-date-picker v-model="form.regDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd"></el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="工商注册类型" prop="regType">
+            <el-select v-model="form.regType" filterable>
+              <el-option v-for="item in regTypeOptions" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="主营产品(服务)所属技术领域" prop="mainProductArray">
+            <el-checkbox-group v-model="form.mainProductArray">
+              <el-checkbox v-for="(item, index) in mainProductsOptions" :label="item.dictLabel" :key="index">{{item.dictLabel}}</el-checkbox>
+            </el-checkbox-group>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="通信地址" prop="address">
+            <el-input v-model="form.address" type="text" auto-complete="off" placeholder="请输入通信地址">
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="邮政编码" prop="zipCode">
+            <el-input v-model="form.zipCode" type="text" auto-complete="off" placeholder="请输入邮政编码">
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="企业所属行政区域" prop="provinceId">
+            <el-select v-model="form.provinceId" placeholder="省" @change="getCityData" style="width: 220px;" filterable>
+              <el-option v-for="(item,index) in provinceDataList" :key="index" :label="item.name" :value="item.id"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="7">
+          <el-form-item prop="cityId" label-width="60px">
+            <el-select v-model="form.cityId" placeholder="市" @change="getDistrictData" style="width: 220px;" filterable>
+              <el-option v-for="(item, index) in cityDataList" :key="index" :label="item.name" :value="item.id"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label-width="0px" prop="districtId">
+            <el-select v-model="form.districtId" placeholder="区" style="width: 220px;" filterable @change="changeDistrict">
+              <el-option v-for="(item, index) in districtDataList" :key="index" :label="item.name" :value="item.id"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="企业所得税主管税务机关" prop="taxOffice">
+            <el-input v-model="form.taxOffice" type="text" auto-complete="off" placeholder="请输入企业所得税主管税务机关">
+            </el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <h3 class="toolbar">
+        <span class="title">法人信息</span>
+      </h3>
+      <el-row :gutter="40">
+        <el-col :span="12">
+          <el-form-item label="姓名" prop="legalName">
+            <el-input v-model="form.legalName" type="text" auto-complete="off" placeholder="请输入法人姓名">
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="身份证号码" prop="legalIdCard">
+            <el-input v-model="form.legalIdCard" type="text" auto-complete="off" placeholder="请输入法人身份证号码">
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="手机号码" prop="legalMobile">
+            <el-input v-model="form.legalMobile" type="text" auto-complete="off" placeholder="手机号码">
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="固定电话" prop="legalPhone">
+            <el-input v-model="form.legalPhone" type="text" auto-complete="off" placeholder="请输入固定电话">
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="传真" prop="legalFax">
+            <el-input v-model="form.legalFax" type="text" auto-complete="off" placeholder="请输入法人传真">
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="E-mail" prop="legalEmail">
+            <el-input v-model="form.legalEmail" type="text" auto-complete="off" placeholder="请输入法人邮箱">
+            </el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <h3 class="toolbar">
+        <span class="title">联系人信息</span>
+      </h3>
+      <el-row :gutter="40">
+        <el-col :span="12">
+          <el-form-item label="姓名" prop="linkName">
+            <el-input v-model="form.linkName" type="text" auto-complete="off" placeholder="请输入联系人姓名">
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="身份证号码" prop="linkIdCard">
+            <el-input v-model="form.linkIdCard" type="text" auto-complete="off" placeholder="请输入联系人身份证号码">
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="手机号码" prop="linkMobile">
+            <el-input v-model="form.linkMobile" type="text" auto-complete="off" placeholder="请填入手机号码">
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="固定电话" prop="linkPhone">
+            <el-input v-model="form.linkPhone" type="text" auto-complete="off" placeholder="请输入联系人固定电话">
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="传真" prop="linkFax">
+            <el-input v-model="form.linkFax" type="text" auto-complete="off" placeholder="请输入联系人传真">
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="E-mail" prop="linkEmail">
+            <el-input v-model="form.linkEmail" type="text" auto-complete="off" placeholder="请输入联系人邮箱">
+            </el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <h3 class="toolbar">
+        <span class="title">企业上市信息</span>
+      </h3>
+      <el-row :gutter="40">
+        <el-col :span="12">
+          <el-form-item label="企业是否上市" prop="listedFlag">
+            <el-radio-group v-model="form.listedFlag">
+              <el-radio label="1">是</el-radio>
+              <el-radio label="0">否</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="企业上市代码" prop="listingCode">
+            <el-input v-model="form.listingCode" type="text" auto-complete="off" placeholder="请输入企业上市代码">
+            </el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <h3 class="toolbar">
+        <span class="title">风险投资信息</span>
+      </h3>
+      <el-row :gutter="40">
+        <el-col :span="12">
+          <el-form-item label="是否引入风险投资" prop="investFlag">
+            <el-radio-group v-model="form.investFlag">
+              <el-radio label="1">是</el-radio>
+              <el-radio label="0">否</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="风险投资金额" prop="investCapital">
+            <el-input v-model="form.investCapital" type="text" auto-complete="off" placeholder="请输入风险投资金额">
+            </el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <h3 class="toolbar">
+        <span class="title">高新企业</span>
+      </h3>
+      <el-row :gutter="40">
+        <el-col :span="12">
+          <el-form-item label="是否为高新企业" prop="techFlag">
+            <el-radio-group v-model="form.techFlag">
+              <el-radio label="1">是</el-radio>
+              <el-radio label="0">否</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="高新企业编号" prop="techCode">
+            <el-input v-model="form.techCode" type="text" auto-complete="off" placeholder="请输入高新企业编号">
+            </el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <h3 class="toolbar">
+        <span class="title">上年度是否做加计扣除</span>
+      </h3>
+      <el-row :gutter="40">
+        <el-col :span="12">
+          <el-form-item label="上年度是否做加计扣除" prop="deductionFlag">
+            <el-radio-group v-model="form.deductionFlag">
+              <el-radio label="1">是</el-radio>
+              <el-radio label="0">否</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <h3 class="toolbar">
+        <span class="title">附件</span>
+      </h3>
+      <el-row :gutter="40">
+        <el-col :span="24">
+          <el-form-item label="企业营业执照" prop="licensePath">
+            <FileUpload :file="{url: form.licensePath, name: form.fileName}" @input="handleSuccess">上传材料</FileUpload>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="其他附件" prop="attachIds">
+            <FileUpload :files="form.attachIds" @input="handleSaleSuccess" :multiple="true">上传材料</FileUpload>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <h3 class="toolbar">
+        <span class="title">文件水印</span>
+      </h3>
+      <el-row :gutter="40">
+        <el-col :span="24">
+          <el-form-item label="文件水印" prop="logo">
+            <ImageUpload @input="handleLogoSuccess"></ImageUpload>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <h3 class="toolbar">
+        <span class="title">服务时间</span>
+      </h3>
+      <el-row :gutter="40">
+        <el-col :span="24">
+          <el-form-item label="服务时间段" prop="serviceDate">
+            <el-date-picker v-model="form.serviceDate" placeholder="选择日期" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
+          </el-form-item>
+        </el-col>
+      </el-row>
       <el-row :gutter="40">
         <el-col :span="24">
           <el-form-item style="width:100%;text-align: center;" label-width="0px">
-            <el-button
-              :loading="loading"
-              size="medium"
-              type="primary"
-              @click.native.prevent="handleRegister" style="width: 100px;">
-              <span v-if="!loading">下一步</span>
-              <span v-else>注 册 中...</span>
+            <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-form-item>
@@ -349,10 +342,9 @@
     </el-form>
   </div>
 </template>
-
 <script>
 
-import { getEntInfoByIdApi } from "@/api/admin/ent/ent"
+import { getEntInfoByIdApi,updateEntInfoApi } from "@/api/admin/ent/ent"
 import { registerEntApi } from "@/api/login";
 import {getProvinceDataApi,getRegionChildrenApi} from "@/api/common/common"
 import { regTypeOptions,mainProductsOptions,signatoriesOptions } from "@/utils/dataFormat"
@@ -374,6 +366,7 @@ export default {
       }
     };
     return {
+      type: this.$route.query.type,
       activeName: '3',
       provinceName: '',
       cityName: '',
@@ -425,6 +418,7 @@ export default {
   created() {
     this.getProvinceData()
     this.form.id = this.$route.params.id || undefined;
+    this.type = this.$route.query.type || undefined
     if(this.form.id) {
       this.getData()
     }
@@ -441,10 +435,10 @@ export default {
         this.form.deductionFlag = res.data.deductionFlag +''
         let mainProductArray = this.form.mainProducts.split(',') || ['电子信息'];
         this.$set(this.form, 'mainProductArray', mainProductArray);
-        this.serviceDate = []
+        this.form.serviceDate = []
         if(this.form.startDate) {
-          this.serviceDate[0] = this.form.startDate
-          this.serviceDate[1] = this.form.endDate
+          this.form.serviceDate[0] = this.form.startDate
+          this.form.serviceDate[1] = this.form.endDate
         }
         if(this.form.provinceId) {
           this.getCityData()
@@ -458,6 +452,9 @@ export default {
       this.form.licensePath = file.url;
       this.form.fileName = file.name;
     },
+    handleLogoSuccess(file) {
+      this.form.logo = file
+    },
     handleSaleSuccess(files) {
       files.forEach(item => {
         this.form.attachIds.push(item.response.data.id)
@@ -470,6 +467,13 @@ export default {
       getRegionChildrenApi(this.form.provinceId).then(res => {
         if(res.code == 200) {
           this.cityDataList = res.data
+
+          let obj = this.provinceDataList.find(item => {
+            return item.id == this.form.provinceId
+          })
+          this.provinceName = obj.name
+          this.form.taxOffice = '国家税务总局'+this.provinceName+'税务局'
+
         }
       })
     },
@@ -479,9 +483,23 @@ export default {
       getRegionChildrenApi(this.form.cityId).then(res => {
         if(res.code == 200) {
           this.districtDataList = res.data
+
+          let obj = this.cityDataList.find(item => {
+            return item.id == this.form.cityId
+          })
+          this.cityName = obj.name
+          this.form.taxOffice = '国家税务总局'+this.cityName+'税务局'
+
         }
       })
     },
+    changeDistrict() {
+      let obj = this.districtDataList.find(item => {
+        return item.id == this.form.districtId
+      })
+      this.districtName = obj.name
+      this.form.taxOffice = '国家税务总局'+this.districtName+'税务局'
+    },
     getProvinceData() {
       getProvinceDataApi().then(res => {
         if(res.code == 200) {
@@ -492,50 +510,53 @@ export default {
     handleRegister() {
       console.log(process.env.VUE_APP_BASE_API)
       this.form.mainProducts = this.form.mainProductArray.join(',')
-      this.$refs.form.validate(valid => {
-        if (valid) {
-          this.loading = true;
-          registerEntApi(this.form).then(res => {
-            const userName = this.form.userName;
-            this.$alert("<font color='red'>恭喜你,您的账号 " + userName + " 注册成功!</font>", '系统提示', {
-              dangerouslyUseHTMLString: true,
-              type: 'success'
-            }).then(() => {
-              this.$store.dispatch("tagsView/delView", this.$route);
-              this.$router.go(-1);
-            }).catch(() => {});
-          }).catch(() => {
-            this.loading = false;
-            if (this.captchaOnOff) {
-              this.getCode();
-            }
-          })
-        }
-      });
+      if(this.type == 'update') {
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            this.loading = true;
+            updateEntInfoApi(this.form).then(res => {
+              const userName = this.form.userName;
+              this.$alert("<font color='red'>恭喜你,您的账号 " + userName + " 信息修改成功!</font>", '系统提示', {
+                dangerouslyUseHTMLString: true,
+                type: 'success'
+              }).then(() => {
+                this.$store.dispatch("tagsView/delView", this.$route);
+                this.$router.go(-1);
+              }).catch(() => {});
+            }).catch(() => {
+              this.loading = false;
+            })
+          }
+        });
+      }else {
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            this.loading = true;
+            registerEntApi(this.form).then(res => {
+              const userName = this.form.userName;
+              this.$alert("<font color='red'>恭喜你,您的账号 " + userName + " 注册成功!</font>", '系统提示', {
+                dangerouslyUseHTMLString: true,
+                type: 'success'
+              }).then(() => {
+                this.$store.dispatch("tagsView/delView", this.$route);
+                this.$router.go(-1);
+              }).catch(() => {});
+            }).catch(() => {
+              this.loading = false;
+            })
+          }
+        });
+      }
+
     }
   },
   watch: {
-    'form.provinceId' (val) {
-    	if (this.form.provinceId) {
-        // this.getCityData()
-    		let obj = this.provinceDataList.find(item => {
-          return item.id == this.form.provinceId
-        })
-        this.provinceName = obj.name
-        this.form.taxOffice = '国家税务总局'+this.provinceName+'税务局'
-    	}
-    },
     'form.serviceDate'(val) {
-      if(this.form.serviceDate) {
+      if(this.form.serviceDate.length > 0) {
         this.form.startDate = this.form.serviceDate[0]
-        this.form.endDate = this.form.servideDate[1]
+        this.form.endDate = this.form.serviceDate[1]
       }
-    },
-    // 'form.cityId'(val) {
-    //   if(this.form.cityId) {
-    //     this.getDistrictData()
-    //   }
-    // }
+    }
    }
 };
 </script>

+ 57 - 13
src/views/enterprise/ent/index.vue

@@ -74,6 +74,7 @@
       <el-table-column label="操作" align="center" width="180" 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="handleRePwd(scope.row)" v-if="scope.row.entState == '3'">重置密码</el-button>
           <el-button type="text" @click="handleAudit(scope.row)" v-if="scope.row.authState == '1'">审核</el-button>
           <template v-if="scope.row.authState == '2'">
             <el-button type="text" @click="handleUpdate(scope.row)">修改</el-button>
@@ -82,7 +83,6 @@
           </template>
           <template v-if="scope.row.authState == '2' || scope.row.authState == '1'">
             <el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
-            <el-button type="text" @click="handleRePwd(scope.row)">重置密码</el-button>
           </template>
         </template>
       </el-table-column>
@@ -100,15 +100,9 @@
 
 <script>
   import {getProvinceDataApi,getRegionChildrenApi} from "@/api/common/common"
-  import {listEntApi, deleteEntApi} from '@/api/admin/ent/ent'
+  import {listEntApi, deleteEntApi, resetPwdApi, remindUserApi, stopEntUserApi} from '@/api/admin/ent/ent'
   import {entStateOptions, getLabel, authStateOptions} from '@/utils/dataFormat'
-  // import Audit from './components/audit'
-  // import Info from './components/info'
   export default {
-    components: {
-      // Audit,
-      // Info
-    },
     data () {
       return {
         loading: false,
@@ -117,8 +111,6 @@
         districtDataList: [],
         entStateOptions: entStateOptions,
         authStateOptions: authStateOptions,
-        // 模板状态
-        // statusOptions: accessStatus,
         dateRange: [],
         queryParams: {
           pageNum: 1,
@@ -173,10 +165,10 @@
         });
       },
       handleAdd() {
-        this.$router.push("/ent/add")
+        this.$router.push("/ent/add"+'?type=add')
       },
       handleUpdate(row) {
-        this.$router.push("/ent/edit/"+row.id)
+        this.$router.push("/ent/edit/"+row.id+'?type=update')
       },
       // 审核
       handleAudit(row) {
@@ -186,6 +178,55 @@
       handleView(row) {
         this.$router.push("/ent/info/"+row.id+'?type=view')
       },
+      //重置密码
+      handleRePwd(row) {
+        this.$confirm('是否确认重置密码?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+            return resetPwdApi(row.id);
+          }).then(() => {
+            this.queryParams.pageNum = 1;
+            this.getList();
+            this.$message({
+              message: '密码重置成功',
+              type: 'success'
+            });
+          })
+      },
+      handleRemind(row) {
+        this.$confirm('是否确认提醒用户服务时间到期?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+            return remindUserApi(row.id);
+          }).then(() => {
+            this.queryParams.pageNum = 1;
+            this.getList();
+            this.$message({
+              message: '提醒成功',
+              type: 'success'
+            });
+          })
+      },
+      handleStop(row) {
+        this.$confirm('是否确认停用该企业账号?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+            return stopEntUserApi(row.id);
+          }).then(() => {
+            this.queryParams.pageNum = 1;
+            this.getList();
+            this.$message({
+              message: '停用成功',
+              type: 'success'
+            });
+          })
+      },
       handleDelete(row) {
         const id = row.id;
         this.$confirm('是否确认删除该数据?', "警告", {
@@ -197,7 +238,10 @@
           }).then(() => {
             this.queryParams.pageNum = 1;
             this.getList();
-            this.msgSuccess("删除成功");
+            this.$message({
+              message: '删除成功',
+              type: 'success'
+            });
           })
       },
       // 重置

+ 26 - 24
src/views/enterprise/ent/info.vue

@@ -142,22 +142,25 @@
     <table class="table_view">
       <tr>
         <th>公司logo</th>
-        <td>{{}}</td>
+        <td><a class="link" :href="info.logo" target="_blank">{{info.logo}}</a></td>
       </tr>
     </table>
     <div class="oper">
-      <el-button @click="cancel">返回</el-button>
-      <template v-if="info.authState == '1'">
+      <el-button @click="cancel" v-if="type == 'view' || type == 'audit'">返回</el-button>
+      <template v-if="info.authState == '1' && (type == 'view' || type == 'audit')">
         <el-button @click="handleAudit">通过审核</el-button>
         <el-button @click="handleRefuse">驳回</el-button>
       </template>
+      <template v-if="(type != 'view' || type != 'audit') && info.authState == '1'">
+        <el-button @click="handleUpdate">修改</el-button>
+      </template>
     </div>
     <audit-ent v-if="auditEntVisible" ref="auditEnt" @refreshData="getData()"></audit-ent>
   </div>
 </template>
 
 <script>
-  import { getEntInfoByIdApi,auditEntApi } from "@/api/admin/ent/ent"
+  import { getEntInfoByIdApi, auditEntApi } from "@/api/admin/ent/ent"
   import AuditEnt from "./components/audit"
   export default {
     name: 'EntInfo',
@@ -171,12 +174,7 @@
         type: undefined,
         auditEntVisible: false,
         info: {
-
         },
-        auditForm: {
-          authState: '3',
-          id: undefined
-        }
       }
     },
     computed: {
@@ -187,6 +185,7 @@
     created () {
       this.id = this.$route.params.id || undefined;
       this.type = this.$route.query.type || undefined
+      console.log(this.type)
       if(this.id || this.scopeId) {
         this.getData()
       }
@@ -207,23 +206,26 @@
         })
       },
       handleRefuse() {
-        this.auditForm.id = this.id
+        let params = {
+          id: this.id,
+          authState: '3',
+        }
         this.$confirm('是否确认驳回该企业注册?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          auditEntApi(this.auditForm).then(res => {
-            if(res.code == 200) {
-              this.$message({
-                message: '审核驳回成功',
-                type: 'success'
-              });
-            } else {
-              this.$message.error(res.msg);
-            }
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+            return auditEntApi(params);
+          }).then(() => {
+            this.$message({
+              message: '审核驳回成功',
+              type: 'success'
+            });
+            this.getData()
           })
-        }).catch(err => {})
+      },
+      handleUpdate() {
+        
       },
       cancel() {
         this.$store.dispatch("tagsView/delView", this.$route); // 关闭当前tab

+ 15 - 0
src/views/enterprise/project/index.vue

@@ -170,6 +170,21 @@
           this.$refs.addProject.init()
         })
       },
+      handleBatchAdd() {
+
+      },
+      handleDownload() {
+
+      },
+      handleBatchDelte() {
+
+      },
+      handleDownloadMode() {
+
+      },
+      handleUpload() {
+        
+      },
       handleEdit(row) {
         this.$router.push({name: 'editProject', query: {id: row.id, entId: row.entId}})
       },

+ 4 - 61
src/views/login.vue

@@ -4,67 +4,13 @@
       <h3 class="title">企业研发归集系统</h3>
       <el-tabs v-model="activeName" >
         <el-tab-pane label="企业用户" name="first">
-          <enterprise-login></enterprise-login>
+          <enterprise-login :loginType="'entUser'"></enterprise-login>
         </el-tab-pane>
         <el-tab-pane label="平台用户" name="second">
-          <enterprise-login></enterprise-login>
+          <enterprise-login :loginType="'platformUser'"></enterprise-login>
         </el-tab-pane>
       </el-tabs>
     </div>
-    <!-- <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
-      <h3 class="title">企业研发归集系统</h3>
-      <el-form-item prop="username">
-        <el-input
-          v-model="loginForm.username"
-          type="text"
-          auto-complete="off"
-          placeholder="账号"
-        >
-          <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
-        </el-input>
-      </el-form-item>
-      <el-form-item prop="password">
-        <el-input
-          v-model="loginForm.password"
-          type="password"
-          auto-complete="off"
-          placeholder="密码"
-          @keyup.enter.native="handleLogin"
-        >
-          <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
-        </el-input>
-      </el-form-item>
-      <el-form-item prop="code" v-if="captchaOnOff">
-        <el-input
-          v-model="loginForm.code"
-          auto-complete="off"
-          placeholder="验证码"
-          style="width: 63%"
-          @keyup.enter.native="handleLogin"
-        >
-          <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
-        </el-input>
-        <div class="login-code">
-          <img :src="codeUrl" @click="getCode" class="login-code-img"/>
-        </div>
-      </el-form-item>
-      <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
-      <el-form-item style="width:100%;">
-        <el-button
-          :loading="loading"
-          size="medium"
-          type="primary"
-          style="width:100%;"
-          @click.native.prevent="handleLogin"
-        >
-          <span v-if="!loading">登 录</span>
-          <span v-else>登 录 中...</span>
-        </el-button>
-        <div style="float: right;" v-if="register">
-          <router-link class="link-type" :to="'/register'">立即注册</router-link>
-        </div>
-      </el-form-item>
-    </el-form> -->
     <!--  底部  -->
     <div class="el-login-footer">
       <span>Copyright © 2022 All Rights Reserved.</span>
@@ -113,11 +59,8 @@ export default {
   },
   watch: {
     $route: {
-      handler: function(route) {
-        console.log(route)
-        this.redirect = route.query && route.query.redirect;
-        console.log("****************")
-        console.log(this.redirect)
+      handler: function(route) {
+        this.redirect = route.query && route.query.redirect;
       },
       immediate: true
     }

+ 2 - 2
vue.config.js

@@ -7,7 +7,7 @@ function resolve(dir) {
 
 const CompressionPlugin = require('compression-webpack-plugin')
 
-const name = process.env.VUE_APP_TITLE || '云创征信管理系统' // 网页标题
+const name = process.env.VUE_APP_TITLE || '企业研发归集系统' // 网页标题
 
 const port = process.env.port || process.env.npm_config_port || 80 // 端口
 
@@ -35,7 +35,7 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        target: `http://124.232.146.72:7015/`,
+        target: `http://124.232.146.72:7015/api`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''