Parcourir la source

企业信息维护

guhongwei il y a 5 ans
Parent
commit
91bf0c98f7

+ 0 - 1
src/layout/companyidentify/detailInfo.vue

@@ -127,7 +127,6 @@ export default {
     },
 
     submitForm() {
-      this.ruleForm.status = '1';
       this.$emit('submitForm', { data: this.ruleForm });
     },
     resetForm(ruleForm) {

+ 2 - 3
src/layout/companyup/detailInfo.vue

@@ -50,8 +50,8 @@
           </el-form-item>
           <span v-if="ruleForm.status === '0'">
             <el-form-item>
-              <el-button type="primary" @click="submitForm('ruleForm')">审核通过</el-button>
-              <el-button type="danger" @click="resetForm('ruleForm')">审核拒绝</el-button>
+              <el-button type="primary" @click="submitForm()">审核通过</el-button>
+              <el-button type="danger" @click="resetForm()">审核拒绝</el-button>
             </el-form-item>
           </span>
         </el-form>
@@ -80,7 +80,6 @@ export default {
       console.log(code);
       this.$emit('yi', code);
     },
-
     changeer(code) {
       console.log(code);
       this.$emit('er', code);

+ 4 - 4
src/layout/layout-part/menus.vue

@@ -36,7 +36,7 @@
           <el-menu-item index="/otheruser/index">其他用户</el-menu-item>
         </el-menu-item-group>
       </el-submenu>
-       <el-submenu index="4">
+      <el-submenu index="4">
         <template v-slot:title>
           <i class="el-icon-s-grid"></i>
           <span>数字延伸服务管理</span>
@@ -61,9 +61,9 @@
           <el-menu-item index="/tDeclarationApproval/index">政策申报历史记录</el-menu-item>
         </el-menu-item-group>
       </el-submenu>
-       <el-menu-item index="/zhidao/index"> <i class="el-icon-s-grid"></i>指导单位管理</el-menu-item>
-       <el-menu-item index="/news/index"> <i class="el-icon-s-grid"></i>新闻中心管理</el-menu-item>
-      <el-menu-item index="/companyup/index"> <i class="el-icon-s-grid"></i>企业信息管理</el-menu-item>
+      <el-menu-item index="/zhidao/index"> <i class="el-icon-s-grid"></i>指导单位管理</el-menu-item>
+      <el-menu-item index="/news/index"> <i class="el-icon-s-grid"></i>新闻中心管理</el-menu-item>
+      <el-menu-item index="/companyup/index"> <i class="el-icon-s-grid"></i>企业修改信息审核管理</el-menu-item>
       <el-menu-item index="/companyidentify/index"> <i class="el-icon-s-grid"></i>企业认证管理</el-menu-item>
       <el-menu-item index="/character/index"> <i class="el-icon-s-grid"></i>角色管理</el-menu-item>
       <el-menu-item index="/region/index"> <i class="el-icon-s-grid"></i>地区管理</el-menu-item>

+ 5 - 0
src/store/companyup.js

@@ -4,6 +4,7 @@ import _ from 'lodash';
 Vue.use(Vuex);
 const api = {
   otheruserInfo: `/api/financial/companyup`,
+  otheruserStatus: `/api/financial/companyup/status`,
 };
 const state = () => ({});
 const mutations = {};
@@ -29,6 +30,10 @@ const actions = {
     const res = await this.$axios.$delete(`${api.otheruserInfo}/${payload}`);
     return res;
   },
+  async updateStatus({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.otheruserStatus}/${id}`, data);
+    return res;
+  },
 };
 export default {
   namespaced: true,

+ 9 - 22
src/views/companyidentify/detail.vue

@@ -65,55 +65,42 @@ export default {
   },
   methods: {
     ...companyidentify(['query', 'delete', 'fetch', 'update', 'updateStatus']),
-    ...profession({ query: 'query', create: 'create' }),
+    ...profession({ professionquery: 'query', create: 'create' }),
     async searchquery() {
       let pcode = 0;
-      const acc = await this.query({ pcode });
-      console.log(acc.data);
+      const acc = await this.professionquery({ pcode });
       this.$set(this, `yiji`, acc.data);
     },
-
     async syi(code) {
       let pcode = code;
-
-      const ess = await this.query({ pcode });
-      console.log(ess.data);
-
+      const ess = await this.professionquery({ pcode });
       this.$set(this, `erji`, ess.data);
     },
     async ser(code) {
       let pcode = code;
-
-      const ess = await this.query({ pcode });
-      console.log(ess.data);
-
+      const ess = await this.professionquery({ pcode });
       this.$set(this, `sanji`, ess.data);
     },
     async ssan(code) {
       let pcode = code;
-
-      const ess = await this.query({ pcode });
-      console.log(ess.data);
-
+      const ess = await this.professionquery({ pcode });
       this.$set(this, `siji`, ess.data);
     },
     async search() {
       const res = await this.fetch(this.id);
-      console.log(res);
       this.$set(this, `ruleForm`, res.data);
     },
-
     // 提交
     async submitForm({ data }) {
+      data.status = '1';
       const res = await this.updateStatus(data);
       this.$checkRes(res, '认证成功', '发布失败');
       this.$router.push({ path: '/companyidentify/index' });
     },
     // 取消
-    resetForm(ruleForm) {
-      this.ruleForm.status = 2;
-      console.log(this.ruleForm);
-      let res = this.update(this.ruleForm);
+    resetForm({ data }) {
+      data.status = '2';
+      let res = this.update(data);
       this.$checkRes(res, '认证失败', '发布失败');
       this.$router.push({ path: '/companyidentify/index' });
     },

+ 5 - 14
src/views/companyidentify/index.vue

@@ -4,7 +4,6 @@
       <el-col :span="24" class="top">
         <topInfo :topTitle="topTitle" :display="display"></topInfo>
       </el-col>
-
       <el-col :span="24" class="main">
         <newsInfo
           :debtTable="debtTable"
@@ -27,14 +26,13 @@
 import topInfo from '@/layout/common/topInfo.vue';
 import newsInfo from '@/layout/companyidentify/newsInfo.vue';
 import { createNamespacedHelpers } from 'vuex';
-const { mapActions } = createNamespacedHelpers('companyidentify');
+const { mapActions: companyidentify } = createNamespacedHelpers('companyidentify');
 
 export default {
   name: 'index',
   props: {},
   components: {
     topInfo, //头部导航
-
     newsInfo, //列表
   },
   data: () => ({
@@ -54,42 +52,36 @@ export default {
     this.searchinfos();
   },
   computed: {},
-
   methods: {
-    ...mapActions(['query', 'delete']),
+    ...companyidentify({ companyidentifyQuery: 'query' }),
     async search({ skip, limit = 10, ...info } = {}) {
       let sea = { status: 0 };
       info = sea;
       skip = this.skip;
-      const res = await this.query({ skip, limit, ...info });
-      console.log(res);
+      const res = await this.companyidentifyQuery({ skip, limit, ...info });
       var weishenhe = res.data.filter(item => item.status === '0');
       this.$set(this, `debtTable`, weishenhe);
       this.$set(this, `total`, res.total);
     },
-
     async searchinfo({ skip, limit = 10, ...info } = {}) {
       let sea = { status: 1 };
       info = sea;
       skip = this.skip;
-      const res = await this.query({ skip, limit, ...info });
+      const res = await this.companyidentifyQuery({ skip, limit, ...info });
       var success = res.data.filter(item => item.status === '1');
       this.$set(this, `shenheTable`, success);
       this.$set(this, `totals`, res.total);
     },
-
     async searchinfos({ skip, limit = 10, ...info } = {}) {
       let sea = { status: 2 };
       info = sea;
       skip = this.skip;
-      const res = await this.query({ skip, limit, ...info });
+      const res = await this.companyidentifyQuery({ skip, limit, ...info });
       var shibai = res.data.filter(item => item.status === '2');
       this.$set(this, `noshenhetable`, shibai);
       this.$set(this, `totalss`, res.total);
     },
-
     handleClick(newid) {
-      console.log(newid);
       this.$router.push({ path: '/companyidentify/detail', query: { id: newid } });
     },
     async handleCurrentChange({ skip, limit, currentPage }) {
@@ -102,7 +94,6 @@ export default {
     },
     async handleCurrentChangess({ skip, limit, currentPage }) {
       this.$set(this, `skip`, skip);
-
       this.searchinfos();
     },
   },

+ 23 - 36
src/views/companyup/detail.vue

@@ -35,7 +35,7 @@ import detailTopInfo from '@/layout/common/detailTopInfo.vue';
 import detailTop from '@/layout/common/detailTop.vue';
 import detailInfo from '@/layout/companyup/detailInfo.vue';
 import { createNamespacedHelpers } from 'vuex';
-const { mapActions } = createNamespacedHelpers('companyup');
+const { mapActions: companyup } = createNamespacedHelpers('companyup');
 const { mapActions: profession } = createNamespacedHelpers('profession');
 export default {
   name: 'detail',
@@ -65,60 +65,47 @@ export default {
     },
   },
   methods: {
-    ...mapActions(['query', 'delete', 'fetch', 'update']),
-    ...profession({ query: 'query', create: 'create' }),
+    ...companyup({ companyupStatus: 'updateStatus', companyupFetch: 'fetch' }),
+    ...profession({ queryType: 'query', create: 'create' }),
     async searchquery() {
       let pcode = 0;
-      const acc = await this.query({ pcode });
-      console.log(acc.data);
+      const acc = await this.queryType({ pcode });
       this.$set(this, `yiji`, acc.data);
     },
-
     async syi(code) {
       let pcode = code;
-
-      const ess = await this.query({ pcode });
-      console.log(ess.data);
-
+      const ess = await this.queryType({ pcode });
       this.$set(this, `erji`, ess.data);
     },
     async ser(code) {
       let pcode = code;
-
-      const ess = await this.query({ pcode });
-      console.log(ess.data);
-
+      const ess = await this.queryType({ pcode });
       this.$set(this, `sanji`, ess.data);
     },
     async ssan(code) {
       let pcode = code;
-
-      const ess = await this.query({ pcode });
-      console.log(ess.data);
-
+      const ess = await this.queryType({ pcode });
       this.$set(this, `siji`, ess.data);
     },
-
     async search() {
-      const res = await this.fetch(this.id);
-      console.log(res);
-      this.$set(this, `ruleForm`, res.data);
+      const res = await this.companyupFetch(this.id);
+      if (res.errcode === 0) {
+        this.$set(this, `ruleForm`, res.data);
+      }
     },
-
-    // 提交
-    submitForm(ruleForm) {
-      this.ruleForm.status = 1;
-      console.log(this.ruleForm);
-      let res = this.update(this.ruleForm);
-      this.$checkRes(res, '审核成功', '审核成功');
+    // 审核企业修改信息+通过
+    submitForm({ data }) {
+      data.status = '1';
+      let res = this.companyupStatus(data);
+      this.$checkRes(res, '审核通过成功', '审核通过失败');
+      this.goBack();
     },
-    // 取消
-    resetForm(ruleForm) {
-      this.ruleForm.status = 2;
-      console.log(this.ruleForm);
-      let res = this.update(this.ruleForm);
-
-      // this.$router.push({ path: '/companyup/index' });
+    // 审核企业修改信息+拒绝
+    resetForm({ data }) {
+      data.status = '2';
+      let res = this.companyupStatus(data);
+      this.$checkRes(res, '审核拒绝通过', '审核拒绝失败');
+      this.goBack();
     },
     // 返回
     goBack() {

+ 6 - 9
src/views/companyup/index.vue

@@ -27,10 +27,9 @@
 
 <script>
 import topInfo from '@/layout/common/topInfo.vue';
-// import searchInfo from '@/layout/common/searchInfo.vue';
 import newsInfo from '@/layout/companyup/newsInfo.vue';
 import { createNamespacedHelpers } from 'vuex';
-const { mapActions } = createNamespacedHelpers('companyup');
+const { mapActions: companyup } = createNamespacedHelpers('companyup');
 
 export default {
   name: 'index',
@@ -41,7 +40,7 @@ export default {
     newsInfo, //其他用户列表
   },
   data: () => ({
-    topTitle: '企业信息',
+    topTitle: '企业修改信息审核',
     display: 'block',
     debtTable: [],
     shenheTable: [],
@@ -57,32 +56,30 @@ export default {
   },
   computed: {},
   methods: {
-    ...mapActions(['query', 'delete']),
+    ...companyup({ companyupQuery: 'query' }),
     async search({ skip, limit = 10, ...info } = {}) {
       let status = { status: 0 };
       info = status;
       skip = this.skip;
-      const res = await this.query({ skip, limit, ...info });
+      const res = await this.companyupQuery({ skip, limit, ...info });
       var weishenhe = res.data.filter(item => item.status === '0');
       this.$set(this, `total`, res.total);
       this.$set(this, `debtTable`, weishenhe);
     },
-
     async searchinfo({ skip, limit = 10, ...info } = {}) {
       let status = { status: 1 };
       info = status;
       skip = this.skip;
-      const res = await this.query({ skip, limit, ...info });
+      const res = await this.companyupQuery({ skip, limit, ...info });
       var success = res.data.filter(item => item.status === '1');
       this.$set(this, `totals`, res.total);
       this.$set(this, `shenheTable`, success);
     },
-
     async searchinfos({ skip, limit = 10, ...info } = {}) {
       let status = { status: 2 };
       info = status;
       skip = this.skip;
-      const res = await this.query({ skip, limit, ...info });
+      const res = await this.companyupQuery({ skip, limit, ...info });
       var shibai = res.data.filter(item => item.status === '2');
       this.$set(this, `totalss`, res.total);
       this.$set(this, `noshenhetable`, shibai);