刘湘琪 3 lat temu
rodzic
commit
120fd76296

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

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

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

@@ -123,13 +123,18 @@ export default {
       }
     },
     // 上传成功回调
-    handleUploadSuccess(res) {
+    handleUploadSuccess(res) {
+      // if(res.code == 200) {
+      //   this.$emit("input", res.data.url)
+      // }
+      // this.$modal.closeLoading();
       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 = [];
-        this.number = 0;
-        this.$emit("input", this.listToString(this.fileList));
+        this.number = 0;
+        this.$emit("input", res.data.url)
+        // this.$emit("input", this.listToString(this.fileList));
         this.$modal.closeLoading();
       }
     },

+ 1 - 1
src/views/enterprise/declare/index.vue

@@ -31,7 +31,7 @@
         </el-form-item>
       </template>
       <el-form-item label="年份" prop="year">
-        <el-date-picker v-model="queryParams.year" type="year" placeholder="选择年" style="width: 200px;"></el-date-picker>
+        <el-date-picker v-model="queryParams.year" type="year" placeholder="选择年" style="width: 200px;" value-format="yyyy"></el-date-picker>
       </el-form-item>
       <el-form-item label="企业名称" prop="entName">
         <el-input v-model="queryParams.entName" clearable style="width: 200px;" placeholder="请输入企业名称"></el-input>

+ 4 - 2
src/views/enterprise/ent/basicInfo.vue

@@ -130,7 +130,8 @@
       <tr>
         <th>企业营业执照</th>
         <td>
-          <img :src="info.licensePath" alt="license">
+          <a class="link" :href="info.licensePath" target="_blank">企业营业执照</a>
+          <!-- <img :src="info.licensePath" alt="license"> -->
         </td>
         <th>其他附件</th>
         <td>
@@ -145,7 +146,8 @@
       <tr>
         <th>公司logo</th>
         <td>
-          <img :src="info.logo" alt="logo">
+          <a class="link" :href="info.logo" target="_blank">公司logo</a>
+          <!-- <img :src="info.logo" alt="logo"> -->
         </td>
       </tr>
     </table>

+ 1 - 0
src/views/enterprise/ent/edit.vue

@@ -511,6 +511,7 @@ export default {
       this.form.logo = file
     },
     handleLicenseSuccess(file) {
+      console.log(file)
       this.form.licensePath = file
     },
     handleSaleSuccess(files) {

+ 49 - 14
src/views/enterprise/ent/index.vue

@@ -59,11 +59,15 @@
       </div>
     </h3>
     <el-table v-loading="loading" :data="list" border>
-      <el-table-column label="账户" prop="userName" width="120" align="center" />
-      <el-table-column label="企业名称" prop="entName" align="center" width="120"></el-table-column>
-      <el-table-column label="省" prop="provinceName" align="center" width="120"/>
-      <el-table-column label="市" prop="cityName" align="center" width="120" />
-      <el-table-column label="区" prop="districtName" align="center" width="120" />
+      <el-table-column label="账户" prop="userName" width="150" align="center" />
+      <el-table-column label="企业名称" prop="entName" align="center" width="150"></el-table-column>
+      <el-table-column label="省市区" prop="provinceName" align="center" width="180">
+        <template slot-scope="scope">
+          <span>{{scope.row.provinceName}}{{scope.row.cityName}}{{scope.row.districtName}}</span>
+        </template>
+      </el-table-column>
+      <!-- <el-table-column label="市" prop="cityName" align="center" width="120" />
+      <el-table-column label="区" prop="districtName" align="center" width="120" /> -->
       <el-table-column label="社会信用代码" prop="license" align="center" width="160"></el-table-column>
       <el-table-column label="联系人" align="center" prop="linkName" width="150"></el-table-column>
       <el-table-column label="联系人手机号" prop="linkMobile" align="center" width="160"></el-table-column>
@@ -89,12 +93,13 @@
           <el-button type="text" @click="handleView(scope.row)">查看</el-button>
           <!-- 只有科德管理员才可以有以下操作 -->
           <template v-if="roleType =='manager'">
-            <el-button type="text" @click="handleRePwd(scope.row)">重置密码</el-button>
+            <el-button type="text" @click="handleResetPwd(scope.row)">重置密码</el-button>
             <el-button type="text" @click="handleAudit(scope.row)" v-if="scope.row.authState == '1'">审核</el-button>
             <!-- 只有审核通过 authState才可以修改 -->
             <el-button type="text" @click="handleUpdate(scope.row)" v-if="scope.row.authState == '2'">修改</el-button>
             <!-- 只有服务中且审核状态为已通过才可以停用 -->
-            <el-button type="text" @click="handleStop(scope.row)" v-if="scope.row.entState == '2' || scope.row.authState == '2'">停用</el-button>
+            <el-button type="text" @click="handleStop(scope.row)" v-if="scope.row.entState == '2' && scope.row.authState == '2'">停用</el-button>
+            <el-button type="text" @click="handleEnable(scope.row)" v-if="scope.row.entState == '4' && scope.row.authState == '2'">启用</el-button>
             <!-- 只有服务状态为已到期才可以提醒 -->
             <el-button type="text" @click="handleRemind(scope.row)" v-if="scope.row.entState == '3'">提醒</el-button>
             <!-- 审核状态为已驳回不可以删除 -->
@@ -116,9 +121,10 @@
 <!-- 企业管理模块只有科德管理员和税务人员 -->
 <script>
   import {getProvinceDataApi,getRegionChildrenApi} from "@/api/common/common"
-  import {listEntApi, deleteEntApi, resetPwdApi, remindUserApi, stopEntUserApi} from '@/api/admin/ent/ent'
+  import {listEntApi, deleteEntApi, resetPwdApi, remindUserApi, stopEntUserApi,enableEntUserApi} from '@/api/admin/ent/ent'
   import {entStateOptions, getLabel, authStateOptions} from '@/utils/dataFormat'
   import {listEntTaxApi} from '@/api/gov/gov'
+  import { resetUserPwd } from "@/api/system/user";
   export default {
     data () {
       return {
@@ -238,8 +244,8 @@
       handleView(row) {
         this.$router.push("/ent/info/"+row.id+'?type=view')
       },
-      //重置密码
-      handleRePwd(row) {
+      // //重置密码
+      handleResetPwd(row) {
         this.$confirm('是否确认重置密码?', "警告", {
             confirmButtonText: "确定",
             cancelButtonText: "取消",
@@ -249,12 +255,25 @@
           }).then(() => {
             this.queryParams.pageNum = 1;
             this.getList();
-            this.$message({
-              message: '密码重置成功',
-              type: 'success'
-            });
+            setTimeout(() => {        // 加延时
+              this.$modal.msgSuccess("重置密码成功,新密码是:123456");
+            }, 500);
           })
       },
+      /** 重置密码按钮操作 */
+      // handleResetPwd(row) {
+      //   this.$prompt('请输入"' + row.userName + '"的新密码', "提示", {
+      //     confirmButtonText: "确定",
+      //     cancelButtonText: "取消",
+      //     closeOnClickModal: false,
+      //     inputPattern: /^.{5,20}$/,
+      //     inputErrorMessage: "用户密码长度必须介于 5 和 20 之间"
+      //   }).then(({ value }) => {
+      //       resetPwdApi(row.id, value).then(response => {
+      //         this.$modal.msgSuccess("修改成功,新密码是:" + value);
+      //       });
+      //     }).catch(() => {});
+      // },
       handleRemind(row) {
         this.$confirm('是否确认提醒用户服务时间到期?', "警告", {
             confirmButtonText: "确定",
@@ -287,6 +306,22 @@
             });
           })
       },
+      handleEnable(row) {
+        this.$confirm('是否确认启用该企业账号?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+            return enableEntUserApi(row.id);
+          }).then(() => {
+            this.queryParams.pageNum = 1;
+            this.getList();
+            this.$message({
+              message: '启用成功',
+              type: 'success'
+            });
+          })
+      },
       handleDelete(row) {
         const id = row.id;
         this.$confirm('是否确认删除该数据?', "警告", {

+ 4 - 2
src/views/enterprise/ent/info.vue

@@ -130,7 +130,8 @@
       <tr>
         <th>企业营业执照</th>
         <td>
-          <img :src="info.licensePath" alt="license">
+          <a class="link" :href="info.licensePath" target="_blank">企业营业执照</a>
+          <!-- <img :src="info.licensePath" alt="license"> -->
         </td>
         <th>其他附件</th>
         <td>
@@ -145,7 +146,8 @@
       <tr>
         <th>公司logo</th>
         <td>
-          <img :src="info.logo" alt="logo">
+          <a class="link" :href="info.logo" target="_blank">公司logo</a>
+          <!-- <img :src="info.logo" alt="logo"> -->
         </td>
       </tr>
     </table>

+ 10 - 8
src/views/enterprise/project/index.vue

@@ -16,19 +16,19 @@
           <el-option v-for="(item, index) in districtDataList" :key="index" :label="item.name" :value="item.id"></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="年份">
-        <el-date-picker v-model="queryParams.year" type="year" placeholder="选择年" style="width: 200px;" clearable></el-date-picker>
+      <el-form-item label="年份" prop="year">
+        <el-date-picker v-model="queryParams.year" type="year" placeholder="选择年" style="width: 200px;" clearable value-format="yyyy"></el-date-picker>
       </el-form-item>
-      <el-form-item label="企业名称">
+      <el-form-item label="企业名称" prop="entName">
         <el-input v-model="queryParams.entName" clearable style="width: 200px;" placeholder="请填入企业名称"></el-input>
       </el-form-item>
-      <el-form-item label="社会信用代码">
+      <el-form-item label="社会信用代码" prop="license">
         <el-input v-model="queryParams.license" style="width: 200px;" placeholder="请输入社会信用代码" clearable></el-input>
       </el-form-item>
-      <el-form-item label="项目编号">
+      <el-form-item label="项目编号" prop="projectNo">
         <el-input v-model="queryParams.projectNo" style="width: 200px;" placeholder="请输入项目编号" clearable></el-input>
       </el-form-item>
-      <el-form-item label="项目名称">
+      <el-form-item label="项目名称" prop="projectName">
         <el-input v-model="queryParams.projectName" style="width: 200px;" placeholder="请输入项目名称" clearable></el-input>
       </el-form-item>
       <el-form-item>
@@ -86,10 +86,10 @@
           <el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
           <template v-if="roleType == 'entAdmin' || roleType == 'entUser'">
             <el-button type="text" @click="handleEdit(scope.row)">编辑</el-button>
-            <template v-if="scope.row.finCompRate == '100.0%'">
+            <template v-if="scope.row.finCompRate == '100.0%' && scope.row.reportState == '1'">
               <el-button type="text" @click="handleDeclare(scope.row)">提交申报</el-button>
             </template>
-            <template v-if="scope.row.finCompRate == '100.0%' && (userType == 'ENT_TECH' || userType == 'ENT_FIN')">
+            <template v-if="scope.row.finCompRate == '100.0%' && (userType == 'ENT_TECH' || userType == 'ENT_FIN') && scope.row.authState == '1'">
               <el-button type="text" @click="handleAudit(scope.row)">提交审核</el-button>
             </template>
             <template v-if="scope.row.authState == '2' && (userType == 'ENT_ADMIN_TECH' || userType == 'ENT_ADMIN_FIN')">
@@ -202,6 +202,8 @@
         })
       },
       getList() {
+        // console.log(this.queryParams.year)
+        // return
         this.loading = true;
         if(this.userType == 'ENT_ADMIN' || this.userType == 'ENT_TECH' || this.userType == 'ENT_ADMIN_TECH' || this.userType == 'ENT_FIN' || this.userType == 'ENT_ADMIN_FIN') {
           listProjectApi(this.queryParams).then(response => {