Przeglądaj źródła

Merge branch 'feature-authen-and-cheat' of ssh://git.mooctest.com:1022/crowd-2019/crowd-test-service-front into feature-authen-and-cheat

sunjh 6 lat temu
rodzic
commit
32ce578f82

+ 199 - 199
src/components/authen/AuthenticationManage.vue

@@ -151,210 +151,210 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import {
-  checkPassAuth,
-  checkRejectAuth,
-  getAllHandledAuthInfo,
-  getAllHandlingAuthInfo,
-  getCurrentAgencyAuthInfo,
-  getCurrentEnterpriseAuthInfo,
-  getCurrentIndividualAuthenInfo,
-  getFormalTimeFromDate
-} from '@/js/index'
-import {notify} from '@/constants/index'
+    import {
+        checkPassAuth,
+        checkRejectAuth,
+        getAllHandledAuthInfo,
+        getAllHandlingAuthInfo,
+        getCurrentAgencyAuthInfo,
+        getCurrentEnterpriseAuthInfo,
+        getCurrentIndividualAuthenInfo,
+        getFormalTimeFromDate
+    } from '@/js/index'
+    import {notify} from '@/constants/index'
 
 
-export default {
-  name: 'AuthenticationManage',
-  data () {
-    return {
-      currentPage: 1,
-      loading: false,
-      showDialog: false,
-      authenticationStatusUntreated: '审核中',
-      authenticationStatusPass: '审核通过',
-      authenticationStatusReject: '审核未通过',
-      handlingAuthList: [],
-      handledAuthList: [],
-      authInfoDetail: {
-        userId: '',
-        type: '',
-        realName: '',
-        IDCard: '',
-        IDCardPhoto: '',
-        bankAccount: '',
-        address: '',
-        applyTime: '',
+    export default {
+        name: 'AuthenticationManage',
+        data () {
+            return {
+                currentPage: 1,
+                loading: false,
+                showDialog: false,
+                authenticationStatusUntreated: '审核中',
+                authenticationStatusPass: '审核通过',
+                authenticationStatusReject: '审核未通过',
+                handlingAuthList: [],
+                handledAuthList: [],
+                authInfoDetail: {
+                    userId: '',
+                    type: '',
+                    realName: '',
+                    IDCard: '',
+                    IDCardPhoto: '',
+                    bankAccount: '',
+                    address: '',
+                    applyTime: '',
 
 
-        enterpriseName: '',
-        legalPersonName: '',
-        businessLicensePhoto: '',
-        unifiedSocialCreditCode: '',
+                    enterpriseName: '',
+                    legalPersonName: '',
+                    businessLicensePhoto: '',
+                    unifiedSocialCreditCode: '',
 
 
-        evaluationAgencyName: '',
-        evaluationAgencyAbilityList: [],
-        evaluationAgencyResourceList: [],
-        agencyPhoto: '',
-        updateTime: '',
-        expireTime: ''
-      }
-    }
-  },
-  mounted () {
-    this.$nextTick(() => {
-      this.init()
-    })
-  },
-  methods: {
-    init () {
-      this.getHandlingAuthList()
-      this.getHandledAuthList()
-    },
-    //获取所有未认证信息
-    getHandlingAuthList () {
-      this.showLoading()
-      getAllHandlingAuthInfo(this.getHandlingAuthListSuccess, this.getHandlingAuthListFail)
-    },
-    //获取所有已认证信息
-    getHandlingAuthListSuccess (res) {
-      this.handlingAuthList = res
-      this.hideLoading()
-    },
-    getHandlingAuthListFail (error) {
-      this.hideLoading()
-      notify('error', '获取认证信息失败:' + error.data)
-    },
-    getHandledAuthList () {
-      this.showLoading()
-      getAllHandledAuthInfo(this.getHandledAuthListSuccess, this.getHandledAuthListFail)
-    },
-    getHandledAuthListSuccess (res) {
-      this.handledAuthList = res
-      this.hideLoading()
-    },
-    getHandledAuthListFail (error) {
-      this.hideLoading()
-      notify('error', '获取已认证信息失败:' + error.data)
-    },
-    handleCurrentChange (param) {
-      console.log(param)
-    },
-    handleAuthenticationPass (userId, type) {
-      this.showLoading()
-      checkPassAuth(type, userId, this.handleAuthenticationPassSuccess, this.handleAuthenticationPassFail)
-      // item.status = this.authenticationStatusPass
-      // console.log('通过')
-    },
-    handleAuthenticationPassSuccess (res) {
-      this.hideLoading()
-      this.getHandlingAuthList()
-      console.log(res)
-    },
-    handleAuthenticationPassFail (error) {
-      this.hideLoading()
-      console.log(error)
-      notify('error', '通过失败:' + error.data)
-    },
-    handleAuthenticationReject (userId, type) {
-      this.$prompt('请输入驳回本申请的原因', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-      }).then((event) => {
-        const explain = event.value
-        console.log(explain)
-        this.showLoading()
-        const data = {
-          explain: event.value
-        }
-        checkRejectAuth(type, userId, data, this.handleAuthenticationRejectSuccess, this.handleAuthenticationRejectFail)
-      }).catch(() => {
-      })
-    },
-    handleAuthenticationRejectSuccess (res) {
-      this.hideLoading()
-      this.getHandlingAuthList()
-      notify('success', '驳回成功')
-      console.log(res)
-    },
-    handleAuthenticationRejectFail (error) {
-      this.hideLoading()
-      console.log(error)
-      notify('error', '拒绝失败:' + error.data)
-    },
-    handleAuthDetail (userId, type) {
-      this.authInfoDetail.userId = userId
-      this.authInfoDetail.type = type
-      this.getAuthInfo(userId, type)
-    },
-    showLoading () {
-      this.loading = true
-    },
-    hideLoading () {
-      this.loading = false
-    },
-    reformTime (date) {
-      return getFormalTimeFromDate(date)
-    },
-    rowClassName ({row, rowIndex}) {
-      //把每一行的索引放进row.id
-      row.id = rowIndex + 1
-    },
-    showAuthDialog () {
-      this.showDialog = true
-    },
-    hideAuthDialog () {
-      this.showDialog = false
-    },
-    getAuthInfo (userId, type) {
-      this.showLoading()
-      if (type == 'personal') {
-        getCurrentIndividualAuthenInfo(userId, this.getCurrentIndividualAuthenInfoSuccess, this.getCurrentIndividualAuthenInfoFail)
-      } else if (type == 'enterprise') {
-        getCurrentEnterpriseAuthInfo(userId, this.getCurrentEnterpriseAuthInfoSuccess, this.getCurrentEnterpriseAuthInfoFail)
-      } else if (type == 'agency') {
-        getCurrentAgencyAuthInfo(userId, this.getCurrentAgencyAuthInfoSuccess, this.getCurrentAgencyAuthInfoFail)
-      }
-    },
-    getCurrentIndividualAuthenInfoSuccess (res) {
-      this.hideLoading()
-      console.log(res)
-      this.authInfoDetail.realName = res.realName
-      this.authInfoDetail.IDCard = res.idcard
-      this.authInfoDetail.IDCardPhoto = res.idcardPhoto
-      this.authInfoDetail.bankAccount = res.bankAccount
-      this.authInfoDetail.address = res.address
-      this.authInfoDetail.applyTime = res.applyTime
-      this.showAuthDialog()
-      console.log(res)
+                    evaluationAgencyName: '',
+                    evaluationAgencyAbilityList: [],
+                    evaluationAgencyResourceList: [],
+                    agencyPhoto: '',
+                    updateTime: '',
+                    expireTime: ''
+                }
+            }
+        },
+        mounted () {
+            this.$nextTick(() => {
+                this.init()
+            })
+        },
+        methods: {
+            init () {
+                this.getHandlingAuthList()
+                this.getHandledAuthList()
+            },
+            //获取所有未认证信息
+            getHandlingAuthList () {
+                this.showLoading()
+                getAllHandlingAuthInfo(this.getHandlingAuthListSuccess, this.getHandlingAuthListFail)
+            },
+            //获取所有已认证信息
+            getHandlingAuthListSuccess (res) {
+                this.handlingAuthList = res
+                this.hideLoading()
+            },
+            getHandlingAuthListFail (error) {
+                this.hideLoading()
+                notify('error', '获取认证信息失败:' + error.data)
+            },
+            getHandledAuthList () {
+                this.showLoading()
+                getAllHandledAuthInfo(this.getHandledAuthListSuccess, this.getHandledAuthListFail)
+            },
+            getHandledAuthListSuccess (res) {
+                this.handledAuthList = res
+                this.hideLoading()
+            },
+            getHandledAuthListFail (error) {
+                this.hideLoading()
+                notify('error', '获取已认证信息失败:' + error.data)
+            },
+            handleCurrentChange (param) {
+                console.log(param)
+            },
+            handleAuthenticationPass (userId, type) {
+                this.showLoading()
+                checkPassAuth(type, userId, this.handleAuthenticationPassSuccess, this.handleAuthenticationPassFail)
+                // item.status = this.authenticationStatusPass
+                // console.log('通过')
+            },
+            handleAuthenticationPassSuccess (res) {
+                this.hideLoading()
+                this.getHandlingAuthList()
+                console.log(res)
+            },
+            handleAuthenticationPassFail (error) {
+                this.hideLoading()
+                console.log(error)
+                notify('error', '通过失败:' + error.data)
+            },
+            handleAuthenticationReject (userId, type) {
+                this.$prompt('请输入驳回本申请的原因', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                }).then((event) => {
+                    const explain = event.value
+                    console.log(explain)
+                    this.showLoading()
+                    const data = {
+                        explain: event.value
+                    }
+                    checkRejectAuth(type, userId, data, this.handleAuthenticationRejectSuccess, this.handleAuthenticationRejectFail)
+                }).catch(() => {
+                })
+            },
+            handleAuthenticationRejectSuccess (res) {
+                this.hideLoading()
+                this.getHandlingAuthList()
+                notify('success', '驳回成功')
+                console.log(res)
+            },
+            handleAuthenticationRejectFail (error) {
+                this.hideLoading()
+                console.log(error)
+                notify('error', '拒绝失败:' + error.data)
+            },
+            handleAuthDetail (userId, type) {
+                this.authInfoDetail.userId = userId
+                this.authInfoDetail.type = type
+                this.getAuthInfo(userId, type)
+            },
+            showLoading () {
+                this.loading = true
+            },
+            hideLoading () {
+                this.loading = false
+            },
+            reformTime (date) {
+                return getFormalTimeFromDate(date)
+            },
+            rowClassName ({row, rowIndex}) {
+                //把每一行的索引放进row.id
+                row.id = rowIndex + 1
+            },
+            showAuthDialog () {
+                this.showDialog = true
+            },
+            hideAuthDialog () {
+                this.showDialog = false
+            },
+            getAuthInfo (userId, type) {
+                this.showLoading()
+                if (type == 'personal') {
+                    getCurrentIndividualAuthenInfo(userId, this.getCurrentIndividualAuthenInfoSuccess, this.getCurrentIndividualAuthenInfoFail)
+                } else if (type == 'enterprise') {
+                    getCurrentEnterpriseAuthInfo(userId, this.getCurrentEnterpriseAuthInfoSuccess, this.getCurrentEnterpriseAuthInfoFail)
+                } else if (type == 'agency') {
+                    getCurrentAgencyAuthInfo(userId, this.getCurrentAgencyAuthInfoSuccess, this.getCurrentAgencyAuthInfoFail)
+                }
+            },
+            getCurrentIndividualAuthenInfoSuccess (res) {
+                this.hideLoading()
+                console.log(res)
+                this.authInfoDetail.realName = res.realName
+                this.authInfoDetail.IDCard = res.idcard
+                this.authInfoDetail.IDCardPhoto = res.idcardPhoto
+                this.authInfoDetail.bankAccount = res.bankAccount
+                this.authInfoDetail.address = res.address
+                this.authInfoDetail.applyTime = res.applyTime
+                this.showAuthDialog()
+                console.log(res)
 
 
-    },
-    getCurrentIndividualAuthenInfoFail (error) {
-      this.hideLoading()
-      notify('error', '获取个人认证信息出错:' + error.data)
-    },
-    getCurrentEnterpriseAuthInfoSuccess () {
-      this.hideLoading()
-      this.authInfoDetail.enterpriseName = res.enterpriseName
-      this.authInfoDetail.legalPersonName = res.legalPersonName
-      this.authInfoDetail.businessLicensePhoto = res.businessLicensePhoto
-    },
-    getCurrentEnterpriseAuthInfoFail () {
-      this.hideLoading()
-      notify('error', '获取企业认证信息出错:' + error.data)
-    },
-    getCurrentAgencyAuthInfoSuccess () {
-      this.hideLoading()
-      this.authInfoDetail.evaluationAgencyName = res.evaluationAgencyName
-      this.authInfoDetail.evaluationAgencyAbilityList = res.evaluationAgencyAbilityList
-      this.authInfoDetail.evaluationAgencyResourceList = res.evaluationAgencyResourceList
-      this.authInfoDetail.agencyPhoto = res.agencyPhoto
-      this.authInfoDetail.updateTime = res.updateTime
-    },
-    getCurrentAgencyAuthInfoFail () {
-      this.hideLoading()
-      notify('error', '获取机构认证信息出错:' + error.data)
+            },
+            getCurrentIndividualAuthenInfoFail (error) {
+                this.hideLoading()
+                notify('error', '获取个人认证信息出错:' + error.data)
+            },
+            getCurrentEnterpriseAuthInfoSuccess () {
+                this.hideLoading()
+                this.authInfoDetail.enterpriseName = res.enterpriseName
+                this.authInfoDetail.legalPersonName = res.legalPersonName
+                this.authInfoDetail.businessLicensePhoto = res.businessLicensePhoto
+            },
+            getCurrentEnterpriseAuthInfoFail () {
+                this.hideLoading()
+                notify('error', '获取企业认证信息出错:' + error.data)
+            },
+            getCurrentAgencyAuthInfoSuccess () {
+                this.hideLoading()
+                this.authInfoDetail.evaluationAgencyName = res.evaluationAgencyName
+                this.authInfoDetail.evaluationAgencyAbilityList = res.evaluationAgencyAbilityList
+                this.authInfoDetail.evaluationAgencyResourceList = res.evaluationAgencyResourceList
+                this.authInfoDetail.agencyPhoto = res.agencyPhoto
+                this.authInfoDetail.updateTime = res.updateTime
+            },
+            getCurrentAgencyAuthInfoFail () {
+                this.hideLoading()
+                notify('error', '获取机构认证信息出错:' + error.data)
+            }
+        }
     }
     }
-  }
-}
 </script>
 </script>
 
 
 <style scoped>
 <style scoped>

+ 45 - 38
src/components/authen/EnterpriseAuthentication.vue

@@ -3,7 +3,7 @@
     <div class="create-body" v-loading="loading">
     <div class="create-body" v-loading="loading">
       <div class="title">企业信息认证</div>
       <div class="title">企业信息认证</div>
       <el-form :model="authentication" :rules="rules" ref="authentication" label-width="12%" class="demo-report">
       <el-form :model="authentication" :rules="rules" ref="authentication" label-width="12%" class="demo-report">
-        <el-form-item label="公司名" prop="name">
+        <el-form-item label="公司名" prop="enterpriseName">
           <el-input v-if="isModifyMode" v-model="authentication.enterpriseName"></el-input>
           <el-input v-if="isModifyMode" v-model="authentication.enterpriseName"></el-input>
           <span v-if="!isModifyMode">{{authentication.enterpriseName}}</span>
           <span v-if="!isModifyMode">{{authentication.enterpriseName}}</span>
         </el-form-item>
         </el-form-item>
@@ -40,19 +40,19 @@
           <el-link v-if="authentication.explain==null || authentication.explain==''" type="danger" disabled>管理员未填写
           <el-link v-if="authentication.explain==null || authentication.explain==''" type="danger" disabled>管理员未填写
           </el-link>
           </el-link>
         </el-form-item>
         </el-form-item>
-        <el-form-item label="公司法人姓名" prop="name">
+        <el-form-item label="公司法人姓名" prop="legalPersonName">
           <el-input v-if="isModifyMode" v-model="authentication.legalPersonName"></el-input>
           <el-input v-if="isModifyMode" v-model="authentication.legalPersonName"></el-input>
           <span v-if="!isModifyMode">{{authentication.legalPersonName}}</span>
           <span v-if="!isModifyMode">{{authentication.legalPersonName}}</span>
         </el-form-item>
         </el-form-item>
-        <el-form-item label="对公账户" prop="name">
+        <el-form-item label="对公账户" prop="bankAccount">
           <el-input v-if="isModifyMode" v-model="authentication.bankAccount"></el-input>
           <el-input v-if="isModifyMode" v-model="authentication.bankAccount"></el-input>
           <span v-if="!isModifyMode">{{authentication.bankAccount}}</span>
           <span v-if="!isModifyMode">{{authentication.bankAccount}}</span>
         </el-form-item>
         </el-form-item>
-        <el-form-item label="统一社会信用代码" prop="name">
+        <el-form-item label="统一社会信用代码" prop="unifiedSocialCreditCode">
           <el-input v-if="isModifyMode" v-model="authentication.unifiedSocialCreditCode"></el-input>
           <el-input v-if="isModifyMode" v-model="authentication.unifiedSocialCreditCode"></el-input>
           <span v-if="!isModifyMode">{{authentication.unifiedSocialCreditCode}}</span>
           <span v-if="!isModifyMode">{{authentication.unifiedSocialCreditCode}}</span>
         </el-form-item>
         </el-form-item>
-        <el-form-item label="公司地址" prop="name">
+        <el-form-item label="公司地址" prop="address">
           <el-input v-if="isModifyMode" v-model="authentication.address"></el-input>
           <el-input v-if="isModifyMode" v-model="authentication.address"></el-input>
           <span v-if="!isModifyMode">{{authentication.address}}</span>
           <span v-if="!isModifyMode">{{authentication.address}}</span>
         </el-form-item>
         </el-form-item>
@@ -98,28 +98,27 @@ export default {
         businessLicensePhoto: defaultValue.image,
         businessLicensePhoto: defaultValue.image,
         unifiedSocialCreditCode: '',
         unifiedSocialCreditCode: '',
         address: '',
         address: '',
-        authStatus: {},
+        authStatus: {text:"审核中", style:"warning"},
         explain: ''
         explain: ''
       },
       },
-      rules: {
-        // name: [
-        //   {required: true, message: '请输入报告名称', trigger: 'blur'}
-        //   // { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" }
-        // ],
-        // abstract: [
-        //   {
-        //     required: true,
-        //     message: '请输入摘要信息',
-        //     trigger: 'change'
-        //   }
-        // ],
-        // type: [
-        //   {required: true, message: '请选择报告类型', trigger: 'change'}
-        // ],
-        // conclusion: [
-        //   {required: true, message: '请输入报告结论', trigger: 'blur'}
-        // ]
-      }
+        rules: {
+            enterpriseName: [
+                {required: true, message: '请输入公司名称', trigger: 'blur'},
+                {min: 3, max: 50, message: '机构名称长度在 3 到 50 个字符', trigger: 'blur'}
+            ],
+            legalPersonName: [
+                {required: true, message: '请输入公司法人姓名', trigger: 'blur'}
+            ],
+            bankAccount: [
+                {required: true, message: '请输入对公账户', trigger: 'blur'}
+            ],
+            unifiedSocialCreditCode: [
+                {required: true, message: '请输入统一社会信用代码', trigger: 'blur'}
+            ],
+            address: [
+                {required: true, message: '请输入公司地址', trigger: 'blur'}
+            ]
+        }
     }
     }
   },
   },
   mounted () {
   mounted () {
@@ -139,14 +138,14 @@ export default {
       getCurrentEnterpriseAuthInfo(this.user.userVO.id, this.getAuthInfoSuccess, this.getAuthInfoFail)
       getCurrentEnterpriseAuthInfo(this.user.userVO.id, this.getAuthInfoSuccess, this.getAuthInfoFail)
     },
     },
     getAuthInfoSuccess (res) {
     getAuthInfoSuccess (res) {
-      this.hideLoading()
+        this.hideLoading()
       this.authentication.enterpriseName = res.enterpriseName == null ? '暂未填写' : res.enterpriseName
       this.authentication.enterpriseName = res.enterpriseName == null ? '暂未填写' : res.enterpriseName
       this.authentication.legalPersonName = res.legalPersonName == null ? '暂未填写' : res.legalPersonName
       this.authentication.legalPersonName = res.legalPersonName == null ? '暂未填写' : res.legalPersonName
       this.authentication.businessLicensePhoto = res.businessLicensePhoto == null ? defaultValue.image : res.businessLicensePhoto
       this.authentication.businessLicensePhoto = res.businessLicensePhoto == null ? defaultValue.image : res.businessLicensePhoto
       this.authentication.unifiedSocialCreditCode = res.unifiedSocialCreditCode == null ? '暂未填写' : res.unifiedSocialCreditCode
       this.authentication.unifiedSocialCreditCode = res.unifiedSocialCreditCode == null ? '暂未填写' : res.unifiedSocialCreditCode
       this.authentication.bankAccount = res.bankAccount == null ? '暂未填写' : res.bankAccount
       this.authentication.bankAccount = res.bankAccount == null ? '暂未填写' : res.bankAccount
       this.authentication.address = res.address == null ? '暂未填写' : res.address
       this.authentication.address = res.address == null ? '暂未填写' : res.address
-      this.authentication.authStatus = res.authentication
+      this.authentication.authStatus = res.authStatus
       this.authentication.explain = res.explain
       this.authentication.explain = res.explain
       console.log(this.authentication)
       console.log(this.authentication)
     },
     },
@@ -161,17 +160,25 @@ export default {
     //提交认证信息
     //提交认证信息
     updateAuthInfo () {
     updateAuthInfo () {
       //this.isModifyMode = false
       //this.isModifyMode = false
-      this.showLoading()
-      const newAuthentication = {
-        userId: this.user.userVO.id,
-        enterpriseName: this.authentication.enterpriseName,
-        legalPersonName: this.authentication.legalPersonName,
-        businessLicensePhoto: this.authentication.businessLicensePhoto,
-        unifiedSocialCreditCode: this.authentication.unifiedSocialCreditCode,
-        bankAccount: this.authentication.bankAccount,
-        address: this.authentication.address,
-      }
-      updateEnterpriseAuthInfo(this.user.userVO.id, newAuthentication, this.updateAuthInfoSuccess, this.updateAuthInfoFail)
+      this.$refs['authentication'].validate(valid => {
+          if (valid) {
+              this.showLoading()
+              const newAuthentication = {
+                  userId: this.user.userVO.id,
+                  enterpriseName: this.authentication.enterpriseName,
+                  legalPersonName: this.authentication.legalPersonName,
+                  businessLicensePhoto: this.authentication.businessLicensePhoto,
+                  unifiedSocialCreditCode: this.authentication.unifiedSocialCreditCode,
+                  bankAccount: this.authentication.bankAccount,
+                  address: this.authentication.address,
+              }
+              updateEnterpriseAuthInfo(this.user.userVO.id, newAuthentication, this.updateAuthInfoSuccess, this.updateAuthInfoFail)
+          } else {
+              notify('error', '表单填写错误!')
+              return false
+          }
+      })
+
     },
     },
     updateAuthInfoSuccess (res) {
     updateAuthInfoSuccess (res) {
       this.hideLoading()
       this.hideLoading()

+ 64 - 34
src/components/authen/EnterpriseAuthenticationCreate.vue

@@ -3,7 +3,7 @@
     <div class="create-body">
     <div class="create-body">
       <div class="title">企业信息认证</div>
       <div class="title">企业信息认证</div>
       <el-form :model="authentication" :rules="rules" ref="authentication" label-width="12%" class="demo-report">
       <el-form :model="authentication" :rules="rules" ref="authentication" label-width="12%" class="demo-report">
-        <el-form-item label="公司名" prop="name">
+        <el-form-item label="公司名" prop="enterpriseName">
           <el-input size="small" v-if="isModifyMode" v-model="authentication.enterpriseName"></el-input>
           <el-input size="small" v-if="isModifyMode" v-model="authentication.enterpriseName"></el-input>
           <!--<span v-if="!isModifyMode">{{authentication.name}}</span>-->
           <!--<span v-if="!isModifyMode">{{authentication.name}}</span>-->
         </el-form-item>
         </el-form-item>
@@ -23,19 +23,19 @@
           <!--{{authentication.photo}}</a>-->
           <!--{{authentication.photo}}</a>-->
           <!--</div>-->
           <!--</div>-->
         </el-form-item>
         </el-form-item>
-        <el-form-item label="公司法人姓名" prop="name">
+        <el-form-item label="公司法人姓名" prop="legalPersonName">
           <el-input size="small" v-if="isModifyMode" v-model="authentication.legalPersonName"></el-input>
           <el-input size="small" v-if="isModifyMode" v-model="authentication.legalPersonName"></el-input>
           <!--<span v-if="!isModifyMode">{{authentication.name}}</span>-->
           <!--<span v-if="!isModifyMode">{{authentication.name}}</span>-->
         </el-form-item>
         </el-form-item>
-        <el-form-item label="对公账户" prop="name">
+        <el-form-item label="对公账户" prop="bankAccount">
           <el-input size="small" v-if="isModifyMode" v-model="authentication.bankAccount"></el-input>
           <el-input size="small" v-if="isModifyMode" v-model="authentication.bankAccount"></el-input>
           <!--<span v-if="!isModifyMode">{{authentication.name}}</span>-->
           <!--<span v-if="!isModifyMode">{{authentication.name}}</span>-->
         </el-form-item>
         </el-form-item>
-        <el-form-item label="统一社会信用代码" prop="name">
+        <el-form-item label="统一社会信用代码" prop="unifiedSocialCreditCode">
           <el-input size="small" v-if="isModifyMode" v-model="authentication.unifiedSocialCreditCode"></el-input>
           <el-input size="small" v-if="isModifyMode" v-model="authentication.unifiedSocialCreditCode"></el-input>
           <!--<span v-if="!isModifyMode">{{authentication.bankAccount}}</span>-->
           <!--<span v-if="!isModifyMode">{{authentication.bankAccount}}</span>-->
         </el-form-item>
         </el-form-item>
-        <el-form-item label="公司地址" prop="name">
+        <el-form-item label="公司地址" prop="address">
           <el-input size="small" v-if="isModifyMode" v-model="authentication.address"></el-input>
           <el-input size="small" v-if="isModifyMode" v-model="authentication.address"></el-input>
           <!--<span v-if="!isModifyMode">{{authentication.address}}</span>-->
           <!--<span v-if="!isModifyMode">{{authentication.address}}</span>-->
         </el-form-item>
         </el-form-item>
@@ -82,23 +82,40 @@ export default {
         address: ''
         address: ''
       },
       },
       rules: {
       rules: {
-        // name: [
-        //   {required: true, message: '请输入报告名称', trigger: 'blur'}
-        //   // { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" }
-        // ],
-        // abstract: [
-        //   {
-        //     required: true,
-        //     message: '请输入摘要信息',
-        //     trigger: 'change'
-        //   }
-        // ],
-        // type: [
-        //   {required: true, message: '请选择报告类型', trigger: 'change'}
-        // ],
-        // conclusion: [
-        //   {required: true, message: '请输入报告结论', trigger: 'blur'}
-        // ]
+          enterpriseName: [
+              {required: true, message: '请输入公司名称', trigger: 'blur'},
+              {min: 3, max: 50, message: '机构名称长度在 3 到 50 个字符', trigger: 'blur'}
+          ],
+          legalPersonName: [
+              {required: true, message: '请输入公司法人姓名', trigger: 'blur'}
+          ],
+          bankAccount: [
+              {required: true, message: '请输入对公账户', trigger: 'blur'},
+              {
+                  validator: (rule, value, callback) => {
+                      if (!this.checkNumber(value)) {
+                          callback(new Error('对公账户输入有误'))
+                      } else {
+                          callback()
+                      }
+                  }, trigger: 'blur'
+              },
+          ],
+          unifiedSocialCreditCode: [
+              {required: true, message: '请输入统一社会信用代码', trigger: 'blur'},
+              {
+                  validator: (rule, value, callback) => {
+                      if (!this.checkNumberAndWord(value)) {
+                          callback(new Error('统一社会信用代码输入有误'))
+                      } else {
+                          callback()
+                      }
+                  }, trigger: 'blur'
+              },
+          ],
+          address: [
+              {required: true, message: '请输入公司地址', trigger: 'blur'}
+          ]
       }
       }
     }
     }
   },
   },
@@ -122,20 +139,27 @@ export default {
     //提交认证信息
     //提交认证信息
     submitInfo () {
     submitInfo () {
       //this.isModifyMode = false
       //this.isModifyMode = false
-      this.showLoading()
-      const newAuthentication = {
-        userId: this.user.userVO.id,
-        enterpriseName: this.authentication.enterpriseName,
-        legalPersonName: this.authentication.legalPersonName,
-        businessLicensePhoto: this.authentication.businessLicensePhoto,
-        unifiedSocialCreditCode: this.authentication.unifiedSocialCreditCode,
-        bankAccount: this.authentication.bankAccount,
-        address: this.authentication.address,
-      }
-      uploadEnterpriseAuthenticationInfo(this.user.userVO.id, newAuthentication, this.submitInfoSuccess, this.submitInfoFail)
+      this.$refs['authentication'].validate(valid => {
+          if (valid) {
+              this.showLoading()
+              const newAuthentication = {
+                  userId: this.user.userVO.id,
+                  enterpriseName: this.authentication.enterpriseName,
+                  legalPersonName: this.authentication.legalPersonName,
+                  businessLicensePhoto: this.authentication.businessLicensePhoto,
+                  unifiedSocialCreditCode: this.authentication.unifiedSocialCreditCode,
+                  bankAccount: this.authentication.bankAccount,
+                  address: this.authentication.address,
+              }
+              uploadEnterpriseAuthenticationInfo(this.user.userVO.id, newAuthentication, this.submitInfoSuccess, this.submitInfoFail)
+          } else {
+              notify('error', '表单填写错误!')
+              return false
+          }
+      })
     },
     },
     submitInfoSuccess (res) {
     submitInfoSuccess (res) {
-      this.hideLoading()
+      // this.hideLoading()
       console.log(res)
       console.log(res)
       getCurrentUser().then(res => {
       getCurrentUser().then(res => {
         storageSave('user', res)
         storageSave('user', res)
@@ -225,6 +249,12 @@ export default {
     },
     },
     sendBusMessage () {
     sendBusMessage () {
       this.$root.$emit('user', this.user)
       this.$root.$emit('user', this.user)
+    },
+    checkNumber(value){
+       return /^\d+$/.test(value);
+    },
+    checkNumberAndWord(value){
+        return /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]*$/.test(value);
     }
     }
   },
   },
 }
 }

+ 10 - 1
src/components/authen/IndividualAuthentication.vue

@@ -105,7 +105,16 @@ export default {
           {required: true, message: '请输入身份证上的姓名', trigger: 'blur'},
           {required: true, message: '请输入身份证上的姓名', trigger: 'blur'},
         ],
         ],
         bankAccount: [
         bankAccount: [
-          {required: true, message: '请输入银行卡账户', trigger: 'blur'}
+          {required: true, message: '请输入银行卡账户', trigger: 'blur'},
+          {
+              validator: (rule, value, callback) => {
+                  if (!this.checkNumber(value)) {
+                      callback(new Error('对公账户输入有误'))
+                  } else {
+                      callback()
+                  }
+              }, trigger: 'blur'
+          },
         ],
         ],
         address: [
         address: [
           {required: true, message: '请输入地址', trigger: 'blur'}
           {required: true, message: '请输入地址', trigger: 'blur'}

+ 10 - 1
src/components/authen/IndividualAuthenticationCreate.vue

@@ -90,7 +90,16 @@ export default {
           {required: true, message: '请输入身份证上的姓名', trigger: 'blur'},
           {required: true, message: '请输入身份证上的姓名', trigger: 'blur'},
         ],
         ],
         bankAccount: [
         bankAccount: [
-          {required: true, message: '请输入银行卡账户', trigger: 'blur'}
+          {required: true, message: '请输入银行卡账户', trigger: 'blur'},
+          {
+              validator: (rule, value, callback) => {
+                  if (!this.checkNumber(value)) {
+                      callback(new Error('对公账户输入有误'))
+                  } else {
+                      callback()
+                  }
+              }, trigger: 'blur'
+          },
         ],
         ],
         address: [
         address: [
           {required: true, message: '请输入地址', trigger: 'blur'}
           {required: true, message: '请输入地址', trigger: 'blur'}

+ 8 - 2
src/components/project/Project.vue

@@ -819,8 +819,14 @@ export default {
         this.reportList = res.reportList
         this.reportList = res.reportList
         this.projectOperationControl = res.projectOperationControl
         this.projectOperationControl = res.projectOperationControl
         this.progress = res.progress
         this.progress = res.progress
-        this.hideLoading()
-        this.setEcharts()
+        this.hideLoading();
+        for(var i = 0; i < this.progress.length; i++){
+            if(this.progress[i].value != 0){
+                this.setEcharts()
+                break
+            }
+        }
+
       }).catch((error) => {
       }).catch((error) => {
         this.hideLoading()
         this.hideLoading()
         notify('error', error.data)
         notify('error', error.data)