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

feat(电子签):企业电子签

sufan 3 hete%!(EXTRA string=óta)
szülő
commit
a11f1a3c36

+ 11 - 9
src/api/enterpriseManage/eSign.js

@@ -54,15 +54,6 @@ export function platformAdd(data) {
   })
 }
 
-// 开票信息详情
-export const getAuthInfo = (data) => (
-  request({
-    url: '/purchContract/confirm/getAuthInfo',
-    method: 'post',
-    data
-  })
-)
-
 // 电子签-个人-获取列表
 export const getESignPersonalList = (data) => (
   request({
@@ -106,6 +97,7 @@ export const getESignCompanyList = (data) => (
   })
 )
 
+// 电子签-企业-新增公司
 export const addCompany = (data) => (
   request({
     url: '/electronic/signature/company/add',
@@ -113,3 +105,13 @@ export const addCompany = (data) => (
     data
   })
 )
+
+// 电子签-企业-认证信息
+
+export const getAuthInfo = (params) => (
+  request({
+    url: '/electronic/signature/company/getAuthInfo',
+    method: 'get',
+    params
+  })
+)

+ 26 - 49
src/views/enterpriseManage/eSign/index.vue

@@ -7,8 +7,8 @@
           <div class="left">
             <div class="left" style="margin-bottom: 15px;">
               <el-radio-group v-model="tableType" class="other-radio" @change="changeSignType">
-                <el-radio-button label="com">公司</el-radio-button>
-                <el-radio-button label="person">个人</el-radio-button>
+                <el-radio-button v-power="'company'" label="com">公司</el-radio-button>
+                <el-radio-button v-power="'individual'" label="person">个人</el-radio-button>
               </el-radio-group>
             </div>
           </div>
@@ -34,7 +34,7 @@
             </div>
             <div style="margin-bottom: -5px;">
               <el-input
-                v-model="search.name"
+                v-model="search.keyword"
                 style="width: 300px"
                 :placeholder="tableType == 'com' ? '请输入公司名称/统一社会信用代码' : '请输入姓名/证件号码'"
                 clearable
@@ -43,8 +43,14 @@
             </div>
             <div class="leftBtn" style="margin-bottom: -5px;">
               <el-button type="primary" @click="fetchData">查询</el-button>
-              <el-button v-if="tableType === 'person'" type="primary" @click="handlerOperate('addPerson', '')">新增</el-button>
-              <el-button v-if="tableType === 'com'" type="primary" @click="handlerOperate('addCompany', '')">新增</el-button>
+              <template v-if="tableType === 'person'">
+                <el-button v-power="'individualAdd'" type="primary" @click="handlerOperate('addPerson', '')">新增</el-button>
+              </template>
+
+              <template v-if="tableType === 'com'">
+                <el-button v-power="'companyAuthAddDetail'" type="primary" @click="handlerOperate('addCompany', '')">新增</el-button>
+              </template>
+
             </div>
           </div>
         </div>
@@ -68,9 +74,10 @@
           <tr><th>身份证号:</th><td colspan="5">{{ comDetail.legal }}</td></tr>
           <tr><th>手机号:</th><td colspan="5">{{ comDetail.legalMobile }}</td></tr>
         </table>
-        <template slot="footer">
+
+        <div class="submit-btn">
           <el-button type="normal" @click="$refs.comDetail.show = false">关闭</el-button>
-        </template>
+        </div>
       </cy-dialog>
 
       <cy-dialog ref="personDetail" title="个人信息">
@@ -188,7 +195,7 @@ import { mapGetters } from 'vuex'
 import signComTable from './signComTable'
 import signPersonTable from './signPersonTable'
 import request from '@/utils/request'
-import { refreshAuthLink, getESignPersonalList, getESignCompanyList, getESignPersonalDetails, addESignPersonal, updateESignPersonal, addCompany } from '@/api/enterpriseManage/eSign'
+import { refreshAuthLink, getESignPersonalList, getESignCompanyList, getESignPersonalDetails, addESignPersonal, updateESignPersonal, addCompany, getAuthInfo } from '@/api/enterpriseManage/eSign'
 import { getEnterpriseInspectionInfo } from '@/api/dictionary'
 export default {
   name: 'EnterpriseManagement',
@@ -201,7 +208,7 @@ export default {
       loading: false,
       tableType: 'com',
       search: {
-        name: '',
+        keyword: '',
         status: ''
       },
       tableData: [],
@@ -318,7 +325,7 @@ export default {
           this.$refs.comInfoRef.show = true
           break
         case 'comUrlDetail':
-          this.getComDetail(row.socialCreditCode)
+          this.getComDetail(row.id)
           break
         case 'createComUrl':
           this.createUrl(row.id, 'com')
@@ -326,12 +333,6 @@ export default {
         case 'createPersonUrl':
           this.createUrl(row.id, 'person')
           break
-        case 'comUrlDelete':
-          this.deleteUrl(row.id, 'com')
-          break
-        case 'personUrlDelete':
-          this.deleteUrl(row.id, 'person')
-          break
         case 'copyUrl':
           this.copyUrl(row.shortAuthUrl)
           break
@@ -342,7 +343,7 @@ export default {
           this.refreshAuthLink(row.id)
           break
         case 'refreshComUrl':
-          this.refreshSignStatus(row.fddCustomerId, 'com')
+          this.refreshSignStatus(row.id, 'com')
           break
         case 'refreshPersonUrl':
           this.refreshSignStatus(row.id, 'person')
@@ -359,48 +360,24 @@ export default {
       }
     },
 
-    getComDetail(fddCustomerId) {
-      request({
-        url: '/purchContract/confirm/getAuthInfo',
-        method: 'post',
-        data: {
-          fddCustomerId
-        }
-      }).then(({ data }) => {
-        this.comDetail = { ...data }
+    getComDetail(id) {
+      getAuthInfo({ id }).then(({ data }) => {
+        this.comDetail = data
         this.$refs.comDetail.show = true
       })
     },
     createUrl(id, type) {
-      const url = type === 'com' ? '/customer/flushUrlByCompany' : '/electronic/signature/personal/flushUrl'
+      const url = type === 'com' ? '/electronic/signature/company/flushUrl' : '/electronic/signature/personal/flushUrl'
       request({
         url,
         method: 'get',
-        params: { id }
+        params: { Loading: true, id }
       }).then(() => {
         this.$message.success('刷新成功')
         this.fetchData()
       })
     },
 
-    deleteUrl(id, type) {
-      this.$confirm('确认删除吗?', '删除', {
-        cancelButtonText: '取消',
-        confirmButtonText: '确定',
-        type: 'warning'
-      }).then(() => {
-        const url = type === 'com' ? '/customer/deleteCustomer' : '/electronic/signature/personal/delete'
-        request({
-          url,
-          method: 'post',
-          params: { id }
-        }).then(() => {
-          this.$message.success('删除成功')
-          this.fetchData()
-        })
-      })
-    },
-
     getPersonDetail(id, type) {
       if (type !== 'add') {
         getESignPersonalDetails({ id }).then(({ data }) => {
@@ -411,7 +388,6 @@ export default {
             enterpriseCardPhotoList: cardPhotoFile ? [cardPhotoFile] : [],
             enterpriseCardRevPhotoList: cardRevPhotoFile ? [cardRevPhotoFile] : []
           }
-          console.log(this.personDetailForm, 888888)
         })
       } else {
         this.personDetailForm = JSON.parse(JSON.stringify(this.deepPersonDetailForm))
@@ -481,9 +457,9 @@ export default {
 
     refreshSignStatus(id, type) {
       request({
-        url: type === 'com' ? '/purchContract/confirm/getAuthStatus' : '/electronic/signature/personal/flush',
+        url: type === 'com' ? '/electronic/signature/company/flushInfoFromSop' : '/electronic/signature/personal/flush',
         method: 'get',
-        params: type === 'com' ? { customerId: id } : { id }
+        params: { Loading: true, id }
       }).then(() => {
         this.$message.success('刷新成功')
         this.fetchData()
@@ -513,6 +489,7 @@ export default {
           addCompany(params).then(() => {
             this.$refs.comInfoRef.show = false
             this.$message.success('添加成功')
+            this.fetchData()
             return
           })
         } else {

+ 7 - 21
src/views/enterpriseManage/eSign/signComTable.js

@@ -8,7 +8,7 @@ export default {
         },
         {
           label: '公司名称',
-          prop: 'corporateName',
+          prop: 'name',
           showTooltip: true
         },
         {
@@ -72,15 +72,11 @@ export default {
             //   btnList.splice(-2)
             // }
             const options = btnList.map(item => {
-              let str = item.svgIcon ?
-                <svg-icon icon-class={item.svgIcon} style="width: 16px; height: 16px;" />
-               : <i class={item.icon}></i>
-              return (
-                this.comTablePower({ item }) && <el-tooltip class='item' effect='dark' content={item.msg} placement='top' >
-                  <span class='table-icon-box' onClick={() => { this.handlerOperate(item.category, row) }}>
-                    { str }
-                  </span>
-                </el-tooltip>
+              return (<el-tooltip class='item' effect='dark' content={item.msg} placement='top' >
+                <span class='table-icon-box' v-power={item.power} onClick={() => { this.handlerOperate(item.category, row) }}>
+                  <i class={item.icon}></i>
+                </span>
+              </el-tooltip>
               )
             })
             return <div>{ options }</div>
@@ -90,15 +86,5 @@ export default {
       ]
     }
   },
-  computed: {
-    comTablePower() {
-      return ({ item }) => {
-        const { power } = item
-        if (power && !this.btnPermission.includes(power)) {
-          return false
-        }
-        return true
-      }
-    }
-  }
+  computed: {}
 }

+ 10 - 26
src/views/enterpriseManage/eSign/signPersonTable.js

@@ -48,47 +48,40 @@ export default {
               {
                 msg: '修改详情',
                 icon: 'iconfont icon-xiugai',
-                // power: 'individualUpdateDetail',
+                power: 'individualUpdateDetail',
                 category: 'updatePersonUrl'
               },
               {
                 msg: '复制认证链接',
                 icon: 'iconfont icon-fuzhi',
-                // power: 'individualCopyAuthUrl',
+                power: 'individualCopyAuthUrl',
                 category: 'copyUrl'
               },
               {
                 msg: '刷新认证状态',
                 icon: 'iconfont icon-shuaxin',
-                // power: 'individualFlushStatus',
+                power: 'individualFlushStatus',
                 category: 'refreshPersonUrl'
               },
               {
                 msg: '认证详情',
                 icon: 'iconfont icon-Magnifier',
-                // power: 'individualView',
+                power: 'individualView',
                 category: 'personUrlDetail'
               },
               {
                 msg: '重新生成认证链接',
                 icon: 'thin-icon el-icon-refresh',
-                // power: 'individualCreateUrl',
+                power: 'individualCreateUrl',
                 category: 'createPersonUrl'
               }
             ]
-            // if(!row.authStatus) {
-            //   btnList.pop()
-            // }
             const options = btnList.map(item => {
-              const str = item.svgIcon
-                ? <svg-icon icon-class={item.svgIcon} style='width: 16px; height: 16px;' />
-                : <i class={item.icon}></i>
-              return (this.personTablePower({ item }) &&
-                <el-tooltip class='item' effect='dark' content={item.msg} placement='top' >
-                  <span class='table-icon-box' onClick={() => { this.handlerOperate(item.category, row) }}>
-                    { str }
-                  </span>
-                </el-tooltip>
+              return (<el-tooltip class='item' effect='dark' content={item.msg} placement='top' >
+                <span class='table-icon-box' v-power={ item.power } onClick={() => { this.handlerOperate(item.category, row) }}>
+                  <i class={item.icon}></i>
+                </span>
+              </el-tooltip>
               )
             })
             return <div>{ options }</div>
@@ -99,14 +92,5 @@ export default {
     }
   },
   computed: {
-    personTablePower() {
-      return ({ item }) => {
-        const { power } = item
-        if (power && !this.btnPermission.includes(power)) {
-          return false
-        }
-        return true
-      }
-    }
   }
 }