Explorar o código

二级单位审核基本完成!只能演示用户审核,修改中!

Signed-off-by: ljm <ljm@qq.com>
ljm %!s(int64=6) %!d(string=hai) anos
pai
achega
5217011a69

+ 407 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/companyaudit/index.vue

@@ -0,0 +1,407 @@
+<template>
+  <div>
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item :to="{ path: '/oilsupplier/companyaudit' }">公司审核</el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-card class="box-card">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"> 公司审核列表</i>
+        </span>
+      </div>
+      <el-row :gutter="20">
+        <el-col :span="24">
+          <el-collapse>
+            <el-collapse-item title="查询公司">
+              <el-form ref="form" :model="searchForm" label-width="120px">
+                <el-row>
+                  <el-col :span="8">
+                    <el-form-item label="公司名称">
+                      <el-input v-model="searchForm.Name" placeholder="请输入公司名称"> ></el-input>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col class="line" :span="24" style="background-color:lightgrey; line-height: 1px">&nbsp;</el-col>
+                </el-row>
+                <el-row :gutter="0" style="text-align:right;margin-top:10px;">
+                  <el-button @click="initData" size="small" type="primary">查询</el-button>
+                  <el-button type="primary" class="el-button--small" @click="clearSearch" style="margin-left:8px">重 置</el-button>
+                </el-row>
+              </el-form>
+            </el-collapse-item>
+          </el-collapse>
+          <el-table :data="list" border style="width: 100%">
+            <el-table-column label="操作" width="120" align="center" header-align="center" fixed="right">
+              <template slot-scope="scope">
+                <el-button size="medium" type="text" title="审核" @click="checkData(scope.row)" :disabled="scope.row.CheckStatus == 1">审核</el-button>
+              </template>
+            </el-table-column>
+            <el-table-column prop="CheckStatus" label="审核状态" width="120" align="center" header-align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span v-if="scope.row.CheckStatus == 0" style="color:#E6A23C">等待审核</span>
+                <span v-if="scope.row.CheckStatus == 1" style="color:#67C23A">已审核通过</span>
+              </template>
+            </el-table-column>
+            <el-table-column prop="SupplierName" label="公司名称" align="center" header-align="center" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="OrganCode" label="组织机构代码" align="center" header-align="center" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="LegalPerson" label="法定代表人" align="center" header-align="center" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="ContactName" label="联系人" align="center" header-align="center" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="UserName" label="登录账号" align="center" header-align="center" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="UserRealName" label="用户名" align="center" header-align="center" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="UserTelephone" label="用户手机号" align="center" header-align="center" show-overflow-tooltip></el-table-column>
+          </el-table>
+          <el-pagination style="float:right;margin:10px 0 10px 0;" @size-change="handleSizeChange" @current-change="handleCurrentChange"
+            :current-page="currentPage" :page-size="size" :page-sizes="[10, 15, 20 ]" layout="total, sizes, prev, pager, next, jumper"
+            :total="currentItemCount">
+          </el-pagination>
+        </el-col>
+      </el-row>
+    </el-card>
+    <!-- 公司审核信息 -->
+    <el-dialog title="公司审核信息" :visible.sync="dialogVisible">
+      <el-form label-width="135px" ref="formData" :model="formData" size="small">
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="公司名称" label-width="150px" style="width: 100%" prop="SupplierName">
+              <el-input v-model="formData.SupplierName" disabled></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="组织机构代码" label-width="150px" style="width: 100%" prop="OrganCode">
+              <el-input v-model="formData.OrganCode" disabled></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="法定代表人姓名" label-width="150px" style="width: 100%" prop="LegalPerson">
+              <el-input v-model="formData.LegalPerson" disabled></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="法定代表人身份证号" label-width="150px" style="width: 100%" prop="LegalPersonId">
+              <el-input v-model="formData.LegalPersonId"  disabled></el-input>           
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="法定代表人身份证扫描件" label-width="170px" prop="LegalPersonImg">
+              <div class="block" style="overflow: auto;">
+                <template>
+                  <el-row>
+                    <el-col :span="12" v-for="(url, index) in urlList" :key="index">
+                      <span>
+                        <el-image style="width: 170px; height: 100px" :src="url"></el-image>
+                      </span>
+                    </el-col>
+                  </el-row>
+                </template>
+              </div>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="联系人姓名" label-width="150px" style="width: 100%" prop="ContactName">
+              <el-input v-model="formData.ContactName" disabled></el-input>           
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="联系人身份证号" label-width="150px" style="width: 100%" prop="ContactId">
+              <el-input v-model="formData.ContactId" disabled></el-input>           
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="联系人身份证扫描件" label-width="170px" prop="ContactImg">
+              <div class="block" style="overflow: auto;">
+                <template>
+                  <el-row>
+                    <el-col :span="12" v-for="(url, index) in urlList2" :key="index">
+                      <span>
+                        <el-image style="width: 170px; height: 100px" :src="url"></el-image>
+                      </span>
+                    </el-col>
+                  </el-row>
+                </template>
+              </div>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="账号/Email" label-width="150px" style="width: 100%" prop="UserName">
+              <el-input v-model="formData.UserName" disabled></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="用户名"  label-width="150px" style="width: 100%" prop="UserRealName">
+              <el-input v-model="formData.UserRealName" disabled></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="手机号"   style="width: 100%" prop="UserTelephone">
+              <el-input v-model="formData.UserTelephone" disabled></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row style="margin-left: 35%; margin-top: 10px; margin-bottom: 20px;">
+          <el-button size="mini" @click="cancelOption">审核未通过</el-button>
+          <el-button size="mini" type="primary" @click="ensureOption" style="margin-left: 20%;">审核通过</el-button>
+        </el-row>
+      </el-form>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: 'companyaudit',
+    data() {
+      return {
+        currentItemCount: 0,
+        currentPage: 1,
+        size: 10,
+        list: [], //公司列表
+        searchForm: {
+          Name: '' //公司名称
+        },
+        dialogVisible: false,
+        urlList: [], //照片地址数组
+        urlList2: [], //照片地址数组2
+        formData: {
+          Id: '', //int
+          UserId: '', //int
+          UserName: '', //账号/Email
+          UserRealName: '', //用户真实姓名
+          UserTelephone: '', //用户手机号
+          UserPass: '',
+          UserPass2: '',
+          SupplierName: '',
+          OilCertificateNo: '',
+          Grade: '',
+          MgrUnit: '',
+          OperType: '',
+          Country: '',
+          CommercialNo: '',
+          OrganCode: '',
+          CountryTaxNo: '',
+          LocalTaxNo: '',
+          Address: '',
+          DetailAddress: '',
+          Province: '',
+          City: '',
+          Street: '',
+          HouseNo: '',
+          ZipCode: '',
+          BusinessScope: '',
+          LegalPerson: '',
+          LegalPersonId: '',
+          LegalPersonURL: '',
+          CategoryCode: '',
+          CategoryName: '',
+          RegCapital: 0, //float32
+          Currency: '',
+          ContactName: '',
+          ContactId: '',
+          ContactURL: '',
+          CompanyType: '',
+          SetupTime: '', //time
+          DepositBank: '',
+          BankAccount: '',
+          EMail: '',
+          BankCreditRating: '',
+          Mobile: '',
+          Telphone: '',
+          Fax: '',
+          CompanyTel: '',
+          QQ: '',
+          CompanyUrl: '',
+          Remark: '',
+          CheckStatus: 0, //二级单位审核状态,0:未通过,1:通过 默认0
+          IsDelete: 0, //删除状态,0正常,1已删除
+          LinkAddress: '',
+          LinkProvince: '',
+          LinkCity: '',
+          LinkStreet: '',
+          LinkHouseNo: '',
+          LinkZipCode: '',
+          HseTraining: ''
+        },
+      }
+    },
+    created() {
+      this.initData()
+    },
+    methods: {
+      initData() {
+        let _this = this
+        const params = {
+          _currentPage: this.currentPage,
+          _size: this.size,
+          Name: this.searchForm.Name
+        }
+        this.$axios.get("/register/getcompanylist", {
+            params
+          })
+          .then(function (response) {
+            _this.list = response.data.items
+
+            console.log("***_this.list**",_this.list)
+
+            _this.currentItemCount = response.data.currentItemCount
+          })
+          .catch(function (error) {
+            console.log(error);
+          });
+      },
+
+      //审核公司信息
+      checkData(row) {
+        let _this = this
+        _this.formData = row
+        console.log("**row**",row)
+        _this.dialogVisible = true
+
+        //处理URL
+        _this.urlList = []
+        let urlArr = _this.formData.LegalPersonURL.split('&')
+        if (urlArr) {
+          for (let i = 0; i < urlArr.length; i++) {
+            let tempURL = urlArr[i].split('|')
+            _this.urlList.push('http://' + tempURL[0])
+          }
+        }
+        _this.urlList2 = []
+        let urlArr2 = _this.formData.ContactURL.split('&')
+        if (urlArr2) {
+          for (let i = 0; i < urlArr2.length; i++) {
+            let tempURL = urlArr2[i].split('|')
+            _this.urlList2.push('http://' + tempURL[0])
+          }
+        }
+      },
+
+      //审核未通过
+      cancelOption() {
+        let _this = this
+        _this.$axios.delete("/register/deleteinfo/" + _this.formData.Id, {})
+          .then(function (response) {
+            if (response.data.code === 0) {
+              _this.$message({
+                type: "success",
+                message: response.data.message
+              });
+              //关闭dialog
+              _this.dialogVisible = false
+              // 更新界面
+              _this.initData()
+            } else {
+              _this.$message({
+                type: "warning",
+                message: response.data.message
+              });
+            }
+          })
+          .catch(function (error) {
+            console.log(error);
+          })
+      },
+
+      //审核通过
+      ensureOption() {
+        let _this = this
+        _this.$axios.post('/register/adduser/', _this.formData)
+          .then(res => {
+            if (res.data.code === 0) {
+              _this.$message({
+                type: 'success',
+                message: res.data.message,
+              })
+              //关闭dialog
+              _this.dialogVisible = false
+              //更新列表
+              _this.initData()
+            } else {
+              _this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+
+      handleSizeChange(value) {
+        this.size = value
+        this.currentPage = 1
+        this.initData()
+      },
+      handleCurrentChange(value) {
+        this.currentPage = value
+        this.initData()
+      },
+      clearSearch() {
+        this.searchForm.Name = ''
+        this.initData()
+      }
+    }
+  }
+
+</script>
+
+<style lang="scss">
+  .time {
+    font-size: 13px;
+    color: #999;
+  }
+
+  .bottom {
+    margin-top: 13px;
+    line-height: 12px;
+  }
+
+  .button {
+    padding: 0;
+    float: right;
+  }
+
+  .image {
+    width: 100%;
+    display: block;
+  }
+
+  .clearfix:before,
+  .clearfix:after {
+    display: table;
+    content: "";
+  }
+
+  .clearfix:after {
+    clear: both
+  }
+
+  .el-pagination {
+    margin: 1rem 0 2rem;
+    text-align: right;
+  }
+
+  .plab {
+    font-size: 13px;
+    color: #999;
+  }
+
+  .triggerone {
+    font-size: 13px;
+    margin-left: 80px;
+  }
+
+  .plab {
+    font-size: 13px;
+    color: #999;
+  }
+
+  .docdelete .el-radio {
+    padding: 8px 15px 0 0;
+    margin-left: -2px;
+  }
+
+</style>

+ 27 - 23
src/dashoo.cn/frontend_web/src/pages/signup.vue

@@ -97,13 +97,13 @@
                   </el-form-item>
                 </el-col>
                 <el-col :span="12">
-                  <el-form-item label="用户名"  label-width="150px" style="width: 100%" prop="Realname">
-                    <el-input v-model="formData.Realname" placeholder="请输入用户名"></el-input>
+                  <el-form-item label="用户名"  label-width="150px" style="width: 100%" prop="UserRealName">
+                    <el-input v-model="formData.UserRealName" placeholder="请输入用户名"></el-input>
                   </el-form-item>
                 </el-col>
                 <el-col :span="12">
-                  <el-form-item label="手机号"   style="width: 100%" prop="Telephone">
-                    <el-input v-model="formData.Telephone" placeholder="用于审核通知和密码找回"></el-input>
+                  <el-form-item label="手机号"   style="width: 100%" prop="UserTelephone">
+                    <el-input v-model="formData.UserTelephone" placeholder="用于审核通知和密码找回"></el-input>
                   </el-form-item>
                 </el-col>
                 <el-col :span="12">              
@@ -161,13 +161,15 @@
         if (value === '') {
           callback(new Error('请输入公司名称!'));
         } else {
-          for (let i = 0; i < this.supplierNameList.length; i++) {
-            if (value == this.supplierNameList[i].SupplierName) {
-              this.$alert('该公司已注册!', '提示:', {
-                confirmButtonText: '确定',
-              })
-            } else {
-              callback();
+          if (this.supplierNameList) {
+            for (let i = 0; i < this.supplierNameList.length; i++) {
+              if (value == this.supplierNameList[i].SupplierName) {
+                this.$alert('该公司已注册!', '提示:', {
+                  confirmButtonText: '确定',
+                })
+              } else {
+                callback();
+              }
             }
           }
         }
@@ -190,8 +192,8 @@
           Id: '', //int
           UserId: '', //int
           UserName: '', //账号/Email
-          Realname: '', //用户
-          Telephone: '', //用户手机号
+          UserRealName: '', //用户真实姓
+          UserTelephone: '', //用户手机号
           UserPass: '',
           UserPass2: '',
           SupplierName: '',
@@ -235,7 +237,7 @@
           QQ: '',
           CompanyUrl: '',
           Remark: '',
-          CheckStatus: 0, //二级单位审核状态,0:未通过,1:通过
+          CheckStatus: 0, //二级单位审核状态,0:未通过,1:通过 默认0
           IsDelete: 0, //删除状态,0正常,1已删除
           LinkAddress: '',
           LinkProvince: '',
@@ -283,10 +285,10 @@
           UserName: [
             { required: true, message: '请输入账号', trigger: 'blur' }
           ],
-          Realname: [
+          UserRealName: [
             { required: true, message: '请输入用户名', trigger: 'blur' }
           ],
-          Telephone: [
+          UserTelephone: [
             { required: true, message: '请输入手机号', trigger: 'blur' }
           ],
           UserPass: [
@@ -314,12 +316,14 @@
         let _this = this
 
         //判断公司是否注册
-        for (let i = 0; i < _this.supplierNameList.length; i++) {
-          if (_this.formData.SupplierName == _this.supplierNameList[i].SupplierName) {
-            this.$alert('该公司已注册!', '提示:', {
-              confirmButtonText: '确定',
-            })
-            return
+        if (_this.supplierNameList) {
+          for (let i = 0; i < _this.supplierNameList.length; i++) {
+            if (_this.formData.SupplierName == _this.supplierNameList[i].SupplierName) {
+              this.$alert('该公司已注册!', '提示:', {
+                confirmButtonText: '确定',
+              })
+              return
+            }
           }
         }
 
@@ -362,7 +366,7 @@
 
         //手机号验证
         let re3 = /^[1][3456789]\d{9}$/
-        if (!re3.test(_this.formData.Telephone)) {
+        if (!re3.test(_this.formData.UserTelephone)) {
           this.$alert('请填写正确的手机号!', '提示', {
             confirmButtonText: '确定',
           })