Procházet zdrojové kódy

ptr 和 供方信息查询

lijq před 6 roky
rodič
revize
0c5fa5ba0c

+ 28 - 6
src/dashoo.cn/backend/api/business/oilrtx/RtxService.go

@@ -8,7 +8,10 @@ import (
 	"strings"
 	"time"
 
+	"dashoo.cn/utils"
+
 	"dashoo.cn/backend/api/business/organize"
+	"dashoo.cn/business2/userRole"
 	. "dashoo.cn/utils/db"
 	"github.com/go-xorm/xorm"
 )
@@ -172,7 +175,8 @@ func (s *RtxService) HandleSendMsg(username string, tomobile string, message str
 	return resp
 }
 
-func (s *RtxService) HandlePtrLogin(username string, password string) *http.Response {
+func (s *RtxService) HandlePtrLogin(username string, password string, BaseUser string) RtxRespToken {
+	var list []map[string]string
 	client := &http.Client{}
 	var ptrUser PtrUser
 
@@ -196,12 +200,30 @@ func (s *RtxService) HandlePtrLogin(username string, password string) *http.Resp
 	var rtxRespToken RtxRespToken
 	json.Unmarshal(jsonBlob, &rtxRespToken)
 
-	if rtxRespToken.Code == 2000 {
-		log.Println("hahaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
-		//在这里生成好的token
+	if rtxRespToken.Token == "2000" {
+		sql := "select 1 from " + BaseUser + " where UserName='" + username + "'"
+
+		list, _ = s.DBE.QueryString(sql)
+		if len(list) > 0 {
+
+		} else {
+			var baseuser userRole.Base_User
+			pwd, key, _ := utils.TripleDesEncrypt(password)
+
+			baseuser.Id = 0
+			baseuser.Realname = "普通用户"
+			baseuser.Username = username
+			baseuser.Userpassword = pwd
+			baseuser.Publickey = key
+
+			_, err := s.InsertEntity(&baseuser)
+			if err != nil {
+				log.Println(err)
+			}
+		}
 	} else {
-		log.Println("出错了!!!!!!!!!!!!!!!!!!!!")
+		log.Println("Code:" + string(rtxRespToken.Code) + ",Message:" + rtxRespToken.Message + ",Token:" + rtxRespToken.Token)
 	}
 
-	return resp
+	return rtxRespToken
 }

+ 8 - 3
src/dashoo.cn/backend/api/business/oilsupplier/selectbusiness/selectservice.go

@@ -18,12 +18,14 @@ func GetSelectService(xormEngine *xorm.Engine) *SelectService {
 	return s
 }
 
-func (s *SelectService) GetMyPagingEntitiesWithOrderBytbl(supplierTableName, supplierCertTableName string, pageIndex, itemsPerPage int64, orderby string, asc bool, entitiesPtr interface{}, where string) (total int64) {
+func (s *SelectService) GetMyPagingEntitiesWithOrderBytbl(supplierTableName, supplierCertTableName, OilInfoChangeName, OilSupplierFileName string, pageIndex, itemsPerPage int64, orderby string, asc bool, entitiesPtr interface{}, where string) (total int64) {
 	var resultsSlice []map[string][]byte
 
 	//获取总记录数
 	sqlCount := `select count(*) from ` + supplierTableName + ` a `
 	sqlCount += ` left join ` + supplierCertTableName + " b on b.SupplierId = a.Id"
+	sqlCount += ` left join ` + OilInfoChangeName + " c on c.SupplierId = a.Id"
+	sqlCount += ` left join ` + OilSupplierFileName + ` d on d.SupplierId = a.Id `
 	sqlCount += ` where ` + where
 
 	var sql string
@@ -40,9 +42,12 @@ func (s *SelectService) GetMyPagingEntitiesWithOrderBytbl(supplierTableName, sup
 	sql += ` b.SkillerTotal, `
 	sql += ` b.Status, `
 	sql += ` b.WorkflowId, `
-	sql += ` b.ApplyTime `
+	sql += ` b.ApplyTime, `
+	sql += ` c.OldSupplierName `
 	sql += ` from ` + supplierTableName + ` a `
-	sql += ` left join ` + supplierCertTableName + " b on b.SupplierId = a.Id"
+	sql += ` left join ` + supplierCertTableName + ` b on b.SupplierId = a.Id `
+	sql += ` left join ` + OilInfoChangeName + ` c on c.SupplierId = a.Id `
+	sql += ` left join ` + OilSupplierFileName + ` d on d.SupplierId = a.Id `
 	sql += ` where ` + where
 	if asc {
 		sql += ` order by ` + orderby + ` ASC `

+ 5 - 0
src/dashoo.cn/backend/api/business/oilsupplier/supplier/oilsupplier.go

@@ -4,6 +4,10 @@ import (
 	"time"
 )
 
+type UsedName struct {
+	OldSupplierName string `xorm:"comment('曾用名') VARCHAR(255)"`
+}
+
 type OilSupplier struct {
 	Id                 int       `xorm:"not null pk autoincr INT(10)"`
 	SupplierName       string    `xorm:"comment('企业名称') VARCHAR(255)"`
@@ -77,6 +81,7 @@ type OilSupplier struct {
 }
 
 type OilSupplierView struct {
+	UsedName          `xorm:"extends"`
 	OilSupplier       `xorm:"extends"`
 	CertId            string
 	AccessCardNo      string

+ 85 - 40
src/dashoo.cn/backend/api/controllers/oilsupplier/select.go

@@ -33,6 +33,10 @@ type UpInfoSearch struct {
 	Reason           string
 }
 
+type NeedFileTypeStruct struct {
+	NeedFileType []string
+}
+
 // @Title 获取所有
 // @Description
 // @Success 200 {object}
@@ -41,7 +45,8 @@ func (this *SelectController) GetTList() {
 
 	var model supplier.OilSupplierView
 	var model1 RegCapitalRange
-	var model2 supplier.OilSupplier
+	var model2 NeedFileTypeStruct
+
 	var jsonBlob = this.Ctx.Input.RequestBody
 	json.Unmarshal(jsonBlob, &model)
 	json.Unmarshal(jsonBlob, &model1)
@@ -63,84 +68,105 @@ func (this *SelectController) GetTList() {
 	}
 
 	if model.AccessCardNo != "" {
-		where = where + " and AccessCardNo like '%" + model.AccessCardNo + "%'"
+		where = where + " and b.AccessCardNo like '%" + model.AccessCardNo + "%'"
 	}
 	if model.SupplierName != "" {
-		where = where + " and SupplierName like '%" + model.SupplierName + "%'"
+		where = where + " and a.SupplierName like '%" + model.SupplierName + "%'"
 	}
 	if model.SupplierTypeCode != "" {
-		where = where + " and SupplierTypeCode = '" + model.SupplierTypeCode + "'"
+		where = where + " and b.SupplierTypeCode = '" + model.SupplierTypeCode + "'"
 	}
 	if model.InFlag != "" {
-		where = where + " and InFlag = '" + model.InFlag + "'"
+		where = where + " and b.InFlag = '" + model.InFlag + "'"
 	}
 	if model.LegalPerson != "" {
-		where = where + " and LegalPerson like '%" + model.LegalPerson + "%'"
+		where = where + " and a.LegalPerson like '%" + model.LegalPerson + "%'"
 	}
 	if model.ContactName != "" {
-		where = where + " and ContactName like '%" + model.ContactName + "%'"
+		where = where + " and a.ContactName like '%" + model.ContactName + "%'"
 	}
 	if model.CommercialNo != "" {
-		where = where + " and CommercialNo like '%" + model.CommercialNo + "%'"
+		where = where + " and a.CommercialNo like '%" + model.CommercialNo + "%'"
 	}
 
 	if model.CompanyType != "" {
-		where = where + " and CompanyType like '%" + model.CompanyType + "%'"
+		where = where + " and a.CompanyType like '%" + model.CompanyType + "%'"
+	}
+	HseTraining := this.GetString("HseTraining")
+	if HseTraining != "" {
+		where = where + " and a.HseTraining = '" + HseTraining + "'"
 	}
 
-	if model2.BusinessScope != "" {
-		where = where + " and BusinessScope like '%" + model2.BusinessScope + "%'"
+	BusinessScope := this.GetString("BusinessScope")
+	if BusinessScope != "" {
+		where = where + " and a.BusinessScope like '%" + BusinessScope + "%'"
 	}
-	if model2.Province != "" {
-		where = where + " and Province = '" + model2.Province + "'"
+	OldSupplierName := this.GetString("OldSupplierName")
+	if OldSupplierName != "" {
+		where = where + " and c.OldSupplierName like '%" + OldSupplierName + "%'"
 	}
-
-	if model2.City != "" {
-		where = where + " and City = '" + model2.City + "'"
+	Province := this.GetString("Province")
+	if Province != "" {
+		where = where + " and a.Province = '" + Province + "'"
 	}
-
-	if model2.Street != "" {
-		where = where + " and Street = '" + model2.Street + "'"
+	City := this.GetString("City")
+	if City != "" {
+		where = where + " and a.City = '" + City + "'"
 	}
 
-	if model2.Address != "" {
-		where = where + " and Address like '%" + model2.Address + "%'"
+	Street := this.GetString("Street")
+	if Street != "" {
+		where = where + " and a.Street = '" + Street + "'"
 	}
-
-	if model2.LinkProvince != "" {
-		where = where + " and LinkProvince = '" + model2.LinkProvince + "'"
+	Address := this.GetString("Address")
+	if Address != "" {
+		where = where + " and a.Address like '%" + Address + "%'"
 	}
-
-	if model2.LinkCity != "" {
-		where = where + " and LinkCity = '" + model2.LinkCity + "'"
+	LinkProvince := this.GetString("LinkProvince")
+	if LinkProvince != "" {
+		where = where + " and a.LinkProvince = '" + LinkProvince + "'"
 	}
-
-	if model2.LinkStreet != "" {
-		where = where + " and LinkStreet = '" + model2.LinkStreet + "'"
+	LinkCity := this.GetString("LinkCity")
+	if LinkCity != "" {
+		where = where + " and a.LinkCity = '" + LinkCity + "'"
 	}
-
-	if model2.LinkAddress != "" {
-		where = where + " and LinkAddress like '%" + model2.LinkAddress + "%'"
+	LinkStreet := this.GetString("LinkStreet")
+	if LinkStreet != "" {
+		where = where + " and a.LinkStreet = '" + LinkStreet + "'"
 	}
-
-	if model2.DepositBank != "" {
-		where = where + " and DepositBank like '%" + model2.DepositBank + "%'"
+	LinkAddress := this.GetString("LinkAddress")
+	if LinkAddress != "" {
+		where = where + " and a.LinkAddress like '%" + LinkAddress + "%'"
+	}
+	DepositBank := this.GetString("DepositBank")
+	if DepositBank != "" {
+		where = where + " and a.DepositBank like '%" + DepositBank + "%'"
 	}
 	SetupTime := this.GetString("SetupTime")
 	if SetupTime != "" {
-		where = where + " and SetupTime ='" + SetupTime + "'"
+		where = where + " and a.SetupTime ='" + SetupTime + "'"
 	}
 	if model1.RegCapital1 != "" {
-		where = where + " and RegCapital >= '" + model1.RegCapital1 + "'"
+		where = where + " and a.RegCapital >= '" + model1.RegCapital1 + "'"
 	}
 	if model1.RegCapital2 != "" {
-		where = where + " and RegCapital <= '" + model1.RegCapital2 + "'"
+		where = where + " and a.RegCapital <= '" + model1.RegCapital2 + "'"
 	}
 
+	if model2.NeedFileType != nil && len(model2.NeedFileType) > 0 {
+		pararm := ""
+		for i := 0; i < len(model2.NeedFileType); i++ {
+
+			pararm = pararm + "'" + model2.NeedFileType[i] + "',"
+
+		}
+		fmt.Println(pararm[0 : len(pararm)-1])
+		where = where + " and d.NeedFileType in (" + pararm[0:len(pararm)-1] + ")"
+	}
 	svc := selectbusiness.GetSelectService(utils.DBE)
 	var list []supplier.OilSupplierView
 
-	total := svc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, page.CurrentPage, page.Size, orderby, asc, &list, where)
+	total := svc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, OilInfoChangeName, OilSupplierFileName, page.CurrentPage, page.Size, orderby, asc, &list, where)
 
 	var datainfo DataInfo
 	datainfo.Items = list
@@ -192,3 +218,22 @@ func (this *SelectController) Up() {
 	this.ServeJSON()
 
 }
+
+// @Title 获取所有资质名称
+// @Description
+// @Success 200 {object}
+// @router /getnftoptions [post]
+func (this *SelectController) GetNFTOptions() {
+
+	svc := selectbusiness.GetSelectService(utils.DBE)
+
+	var list []map[string]string
+	sql := "select distinct(Name) from " + BaseTableHeader + ""
+	list, _ = svc.DBE.QueryString(sql)
+
+	var datainfo DataInfo
+	datainfo.Items = list
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+
+}

+ 7 - 4
src/dashoo.cn/backend/api/controllers/rtx/rtx.go

@@ -1,6 +1,8 @@
 package rtx
 
 import (
+	"fmt"
+
 	"dashoo.cn/backend/api/business/oilrtx"
 	. "dashoo.cn/backend/api/controllers"
 	"dashoo.cn/utils"
@@ -62,12 +64,13 @@ func (this *RtxController) SendMsg() {
 // @router /ptrlogin [post]
 func (this *RtxController) PtrLogin() {
 	rtxSvc := oilrtx.GetRtxService(utils.DBE)
-	userName := "yuedefeng" //用户名
-	passWord := "123456"    //密码
-	resp := rtxSvc.HandlePtrLogin(userName, passWord)
+	userName := this.GetString("username") //用户名
+	passWord := this.GetString("password")
+	fmt.Println(userName + passWord)
+	resp := rtxSvc.HandlePtrLogin(userName, passWord, BaseUserName)
 
 	var datainfo DataInfo
-	datainfo.Items = resp
+	datainfo.Items = resp.Code
 	this.Data["json"] = &datainfo
 	this.ServeJSON()
 }

+ 6 - 0
src/dashoo.cn/frontend_web/src/api/oilsupplier/select.js

@@ -14,5 +14,11 @@ export default {
       params: params,
       data: formdata
     })
+  },
+  getNFTOptions (myAxios) {
+    return myAxios({
+      url: '/select/getnftoptions',
+      method: 'post'
+    })
   }
 }

+ 7 - 0
src/dashoo.cn/frontend_web/src/api/rtxservice/rtx.js

@@ -5,5 +5,12 @@ export default {
       method: 'GET'
     })
   },
+  rtxLogin (params, myAxios) {
+    return myAxios({
+      url: '/rtx/ptrlogin',
+      method: 'post',
+      params: params
+    })
+  }
 
 }

+ 364 - 303
src/dashoo.cn/frontend_web/src/pages/login.vue

@@ -1,10 +1,10 @@
 <template>
-  <div style="width: 100%; background-color: white;" >
+  <div style="width: 100%; overflow-y: auto; background-color: white">
     <sticky class-name="sub-navbar2" v-if="activeIndex==1 || activeIndex==2">
       <div class="top-wrapper">
         <div style="margin-top: 5px; float: left;">
           <router-link to="/">
-            <img src="../assets/img/logo_dagang2.png" style="height:35px;" />
+            <img src="../assets/img/logo_dagang2.png" style="height:35px;">
           </router-link>
         </div>
 
@@ -14,7 +14,6 @@
           </router-link>
 
           <el-button type="info" size="small" round @click="activeIndex=0">登录供方管理系统</el-button>
-
         </div>
       </div>
     </sticky>
@@ -136,8 +135,12 @@
 
     <div style="background-color: white">
       <div class="top-wrapper">
-        <img src="../assets/img/title_gongfang.png" style="height:60px; margin-top: 5px;" v-if="activeIndex==0">
-        <el-menu  :default-active="activeIndex" @select="handleSelect" mode="horizontal">
+        <img
+          src="../assets/img/title_gongfang.png"
+          style="height:60px; margin-top: 5px;"
+          v-if="activeIndex==0"
+        >
+        <el-menu :default-active="activeIndex" @select="handleSelect" mode="horizontal">
           <el-menu-item index="0">
             <i class="el-icon-tickets"></i>
             <span>登录</span>
@@ -153,10 +156,8 @@
         </el-menu>
       </div>
 
-
-
       <div style="background-color: white;" v-if="activeIndex==0">
-        <div class="back-width" >
+        <div class="back-width">
           <div class="login-body">
             <section class="login">
               <!--<header class="login-header">
@@ -168,19 +169,40 @@
                 <!--<div slot="header" class="clearfix">
                   <span style="font-weight: bold;">用户登录</span>
                 </div>-->
-                <el-form class="login-form" auto-complete="off" :model="model" :rules="rules" ref="user" label-position="top">
+                <el-form
+                  class="login-form"
+                  auto-complete="off"
+                  :model="model"
+                  :rules="rules"
+                  ref="user"
+                  label-position="top"
+                >
                   <el-form-item label="用户名" prop="username">
                     <el-input type="text" v-model="model.username" placeholder="请输入用户名">
-                      <el-select v-model="loginMode" slot="append" placeholder="登录类型" style="width: 110px;">
+                      <el-select
+                        v-model="loginMode"
+                        slot="append"
+                        placeholder="登录类型"
+                        style="width: 110px;"
+                      >
                         <el-option label="普通账户" :value="1"></el-option>
                         <el-option label="PTR认证" :value="2"></el-option>
                       </el-select>
                     </el-input>
                   </el-form-item>
                   <el-form-item label="密码" prop="password">
-                    <el-input type="password" v-model="model.password" placeholder="请输入密码" @keyup.enter.native="login()" />
+                    <el-input
+                      type="password"
+                      v-model="model.password"
+                      placeholder="请输入密码"
+                      @keyup.enter.native="login()"
+                    />
                   </el-form-item>
-                  <el-button type="primary" :loading="loading" @click="login()">{{ loading ? '登录中...' : '登录' }}</el-button>
+                  <el-button
+                    type="primary"
+                    :loading="loading"
+                    @click="loginall()"
+                  >{{ loading ? '登录中...' : '登录' }}</el-button>
                   <el-row>
                     <el-col :span="12">
                       <router-link :to="'/signup'">
@@ -195,16 +217,22 @@
                   </el-row>
                 </el-form>
               </el-card>
-
-
             </section>
           </div>
         </div>
       </div>
 
-
-      <div class="components-container home-wrapper" style="background-color: white;" v-if="activeIndex==1">
-        <el-table :data="noticeList" height="50%"  style="width: 100%; height: 100vh;" @row-click="DownloadFile">
+      <div
+        class="components-container home-wrapper"
+        style="background-color: white;"
+        v-if="activeIndex==1"
+      >
+        <el-table
+          :data="noticeList"
+          height="50%"
+          style="width: 100%; height: 100vh;"
+          @row-click="DownloadFile"
+        >
           <el-table-column prop="Name" label="通知标题">
             <template slot-scope="scope">
               <i class="el-icon-caret-right"></i>
@@ -212,15 +240,22 @@
             </template>
           </el-table-column>
           <el-table-column prop="CreateOn" label="时间" width="141">
-            <template slot-scope="scope">
-              {{ jstimehandle(scope.row.CreateOn+'') }}
-            </template>
+            <template slot-scope="scope">{{ jstimehandle(scope.row.CreateOn+'') }}</template>
           </el-table-column>
         </el-table>
       </div>
 
-      <div class="components-container home-wrapper" style="background-color: white" v-if="activeIndex==2">
-        <el-table :data="fileList" height="50%" style="width: 100%;  height: 100vh;" @row-click="DownloadFile">
+      <div
+        class="components-container home-wrapper"
+        style="background-color: white"
+        v-if="activeIndex==2"
+      >
+        <el-table
+          :data="fileList"
+          height="50%"
+          style="width: 100%;  height: 100vh;"
+          @row-click="DownloadFile"
+        >
           <el-table-column prop="Name" label="文件名">
             <template slot-scope="scope">
               <i class="el-icon-caret-right"></i>
@@ -228,17 +263,12 @@
             </template>
           </el-table-column>
           <el-table-column prop="CreateOn" label="时间" width="141">
-            <template slot-scope="scope">
-              {{ jstimehandle(scope.row.CreateOn+'') }}
-            </template>
+            <template slot-scope="scope">{{ jstimehandle(scope.row.CreateOn+'') }}</template>
           </el-table-column>
         </el-table>
       </div>
-
     </div>
 
-
-
     <!--<div>
       <el-menu  :default-active="activeIndex" @select="handleSelect" mode="horizontal">
         <el-menu-item index="1">通知中心</el-menu-item>
@@ -291,171 +321,207 @@
           </el-table-column>
         </el-table>
       </el-card>
-      <div>-->
+    <div>-->
 
     <div>
       <footer class="login-footer1">
-        <div class="foot-wrapper" style="height: 30px; background-color: transparent; color:#A9A9A9; padding-top: 10px; text-align: right">
-          ©大港油田信息中心 版权所有
-        </div>
+        <div
+          class="foot-wrapper"
+          style="height: 30px; background-color: transparent; color:#A9A9A9; padding-top: 10px; text-align: right"
+        >©大港油田信息中心 版权所有</div>
       </footer>
     </div>
-
   </div>
 </template>
 
 <script>
-  import Vue from 'vue'
-  import Component from 'class-component'
-  import Sticky from '@/components/Sticky'
-  @Component({
-    data () {
-      // form model
-      // TODO: remove default values
-      const model = {
-        username: '',
-        password: ''
-      }
+import Vue from "vue";
+import Component from "class-component";
+import Sticky from "@/components/Sticky";
+import api from "@/api/rtxservice/rtx";
+@Component({
+  data() {
+    // form model
+    // TODO: remove default values
+    const model = {
+      username: "",
+      password: ""
+    };
 
-      // form validate rules
-      const rules = {
-        username: [{
+    // form validate rules
+    const rules = {
+      username: [
+        {
           required: true,
-          message: '请输入用户名'
-        }],
-        password: [{
+          message: "请输入用户名"
+        }
+      ],
+      password: [
+        {
           required: true,
-          message: '请输入密码'
-        }]
-      }
+          message: "请输入密码"
+        }
+      ]
+    };
+
+    return {
+      loginMode: 1,
+      model: model,
+      rules: rules,
+      error: null,
+      loading: false,
+      noticeList: [], //通知列表
+      fileList: [], //文档列表
+      activeName: "first",
+      activeIndex: "0"
+    };
+  },
 
-      return {
-        loginMode: 1,
-        model: model,
-        rules: rules,
-        error: null,
-        loading: false,
-        noticeList: [], //通知列表
-        fileList: [], //文档列表
-        activeName: 'first',
-        activeIndex: '0',
+  created() {
+    this.initNoticeListData();
+    this.initFileListData();
+  },
+  components: {
+    Sticky
+  },
+  methods: {
+    //获取通知列表
+    initNoticeListData() {
+      let _this = this;
+      //传递列名
+      const params = {
+        colName: "NoticeTab"
+      };
+      _this.$axios
+        .get("/document/getdocumentnameandtime", { params })
+        .then(function(response) {
+          _this.noticeList = response.data;
+        })
+        .catch(function(error) {
+          console.log(error);
+        });
+    },
+    //获取文件列表
+    initFileListData() {
+      let _this = this;
+      //传递列名
+      const params = {
+        colName: "DocTab"
+      };
+      _this.$axios
+        .get("/document/getdocumentnameandtime", { params })
+        .then(function(response) {
+          _this.fileList = response.data;
+        })
+        .catch(function(error) {
+          console.log(error);
+        });
+    },
+    //下载文件
+    DownloadFile(row) {
+      let val = row.FileURL;
+      let urlArr = val.split("|");
+      location.href = "http://" + urlArr[0];
+    },
+    //格式化时间
+    jstimehandle(val) {
+      if (val === "") {
+        return "----";
+      } else if (val === "0001-01-01T08:00:00+08:00") {
+        return "----";
+      } else if (val === "5000-01-01T23:59:59+08:00") {
+        return "永久";
+      } else {
+        val = val.replace("T", " ");
+        return val.substring(0, 10);
       }
     },
-
-    created () {
-      this.initNoticeListData()
-      this.initFileListData()
+    handleSelect(key, keyPath) {
+      this.activeIndex = key;
     },
-    components: {
-      Sticky
+    isChrome() {
+      //取得浏览器的userAgent字符串
+      let userAgent = navigator.userAgent;
+
+      //判断是否Chrome浏览器
+      if (userAgent.indexOf("Chrome") > -1) {
+        return true;
+      } else {
+        return false;
+      }
     },
-    methods: {
-      //获取通知列表
-      initNoticeListData() {
-        let _this = this
-        //传递列名
-        const params = {
-          colName: "NoticeTab"
-        }
-        _this.$axios.get("/document/getdocumentnameandtime", {params})
-          .then(function (response) {
-            _this.noticeList = response.data
-          })
-          .catch(function (error) {
-            console.log(error);
-          });
-      },
-      //获取文件列表
-      initFileListData() {
-        let _this = this
-        //传递列名
-        const params = {
-          colName: "DocTab"
-        }
-        _this.$axios.get("/document/getdocumentnameandtime", {params})
-          .then(function (response) {
-            _this.fileList = response.data
-          })
-          .catch(function (error) {
-            console.log(error);
-          });
-      },
-      //下载文件
-      DownloadFile(row){
-        let val = row.FileURL
-        let urlArr = val.split('|')
-        location.href = "http://" + urlArr[0]
-      },
-      //格式化时间
-      jstimehandle(val) {
-        if (val === '') {
-          return '----'
-        } else if (val === '0001-01-01T08:00:00+08:00') {
-          return '----'
-        } else if (val === '5000-01-01T23:59:59+08:00') {
-          return '永久'
-        } else {
-          val = val.replace('T', ' ')
-          return val.substring(0, 10)
-        }
-      },
-      handleSelect (key, keyPath) {
-        this.activeIndex = key
-      },
-      isChrome () {
-        //取得浏览器的userAgent字符串
-        let userAgent = navigator.userAgent
-
-        //判断是否Chrome浏览器
-        if (userAgent.indexOf("Chrome") > -1){
-          return true
-        } else {
-            return false
-        }
+
+    loginall() {
+      if (this.loginMode == 1) {
+        this.login();
+      } else {
+        this.loginptr();
       }
+    },
+    loginptr() {
+      let params = {
+        username: this.model.username,
+        password: this.model.password
+      };
+      api
+        .rtxLogin(params, this.$axios)
+        .then(res => {
+          if (res.data.items === 2000) {
+            this.login();
+          } else {
+            this.$message.warning("账号或密码错误");
+          }
+        })
+        .catch(err => {
+          this.$message.warning("账号或密码错误");
+          console.error(err);
+        });
     }
-
-  })
-  export default class Login extends Vue {
-    layout() {
-      return 'empty'
+  }
+})
+export default class Login extends Vue {
+  layout() {
+    return "empty";
+  }
+  login() {
+    if (!this.isChrome()) {
+      this.$alert(
+        "请用谷歌浏览器、360浏览器(极速模式)等,Chrome内核浏览器打开本系统",
+        "不支持的浏览器",
+        {}
+      );
+      return false;
     }
-    login() {
-      if ( !this.isChrome() ) {
-        this.$alert('请用谷歌浏览器、360浏览器(极速模式)等,Chrome内核浏览器打开本系统', '不支持的浏览器', {})
-        return false
-      }
-      this.logging = true
-      this.$refs.user.validate(async (valid) => {
-        try {
-          if (valid) {
-            await this.$store.dispatch('auth/login', {
-              fields: {
-                username: this.model.username.replace(/(^\s*)|(\s*$)/g, ""),
-                password: this.model.password.replace(/(^\s*)|(\s*$)/g, "")
-              }
-            })
-            if (process.env.appclient == 'lims') {
-              this.$router.push(this.$route.query.page || '/')
-            } else if (process.env.appclient == 'cellbank') {
-              this.$router.push(this.$route.query.page || '/indexdqm')
-            } else {
-              this.$router.push(this.$route.query.page || '/')
+    this.logging = true;
+    this.$refs.user.validate(async valid => {
+      try {
+        if (valid) {
+          await this.$store.dispatch("auth/login", {
+            fields: {
+              username: this.model.username.replace(/(^\s*)|(\s*$)/g, ""),
+              password: this.model.password.replace(/(^\s*)|(\s*$)/g, "")
             }
+          });
+          if (process.env.appclient == "lims") {
+            this.$router.push(this.$route.query.page || "/");
+          } else if (process.env.appclient == "cellbank") {
+            this.$router.push(this.$route.query.page || "/indexdqm");
+          } else {
+            this.$router.push(this.$route.query.page || "/");
           }
-        } catch (e) {
-          // this.$message.warning(e.message)
-          this.$message.warning('账号或密码错误')
-        } finally {
-          this.logging = false
         }
-      })
-    }
-    logout() {
-      this.$store.dispatch('logout')
-    }
+      } catch (e) {
+        // this.$message.warning(e.message)
+        this.$message.warning("账号或密码错误");
+      } finally {
+        this.logging = false;
+      }
+    });
   }
-
+  logout() {
+    this.$store.dispatch("logout");
+  }
+}
 </script>
 
 <!--<script>
@@ -597,179 +663,174 @@ export default {
 </script>-->
 
 <style lang="scss" scoped>
-  @import '../assets/styles/base/variables';
+@import "../assets/styles/base/variables";
 
-  .components-container div {
-    margin-top: 20px;
-  }
+.components-container div {
+  margin-top: 20px;
+}
 
-  .top-wrapper {
-    margin: 0px auto;
-    width: 1004px;
-    /*text-align: right;
+.top-wrapper {
+  margin: 0px auto;
+  width: 1004px;
+  /*text-align: right;
     alignment: right;*/
-    flex-direction: row;
-  }
-  .home-wrapper{
-    margin:0px auto;
-    width: 1004px;
-    flex-direction: column;
-    margin-bottom: 45px;
-  }
-
-  .foot-wrapper{
-    margin:0px auto;
-    width: 1004px;
-    display: flex;
-    alignment: center;
-    align-items: center;
-    flex-direction: column;
-  }
-
-  .back-width1 {
-    background-color: #2F79F6;
-    margin: 0px auto;
-    left: 0;
-    right: 0;
-    top: 20px;
-    width: 1004px;
-  }
-
+  flex-direction: row;
+}
+.home-wrapper {
+  margin: 0px auto;
+  width: 1004px;
+  flex-direction: column;
+  margin-bottom: 45px;
+}
 
-  .login-footer1 {
-    position: fixed;
-    background-color: #34393D;
-    font-size: 10px;
-    clear: both;
-    display: block;
-    text-align: center;
-    margin: 0px auto;
-    bottom: 0px;
-    width: 100%;
-  }
+.foot-wrapper {
+  margin: 0px auto;
+  width: 1004px;
+  display: flex;
+  alignment: center;
+  align-items: center;
+  flex-direction: column;
+}
 
+.back-width1 {
+  background-color: #2f79f6;
+  margin: 0px auto;
+  left: 0;
+  right: 0;
+  top: 20px;
+  width: 1004px;
+}
 
-  /*-----------*/
-  .time {
-    font-size: 13px;
-    color: #999;
-  }
+.login-footer1 {
+  position: fixed;
+  background-color: #34393d;
+  font-size: 10px;
+  clear: both;
+  display: block;
+  text-align: center;
+  margin: 0px auto;
+  bottom: 0px;
+  width: 100%;
+}
 
-  .bottom {
-    margin-top: 13px;
-    line-height: 12px;
-  }
+/*-----------*/
+.time {
+  font-size: 13px;
+  color: #999;
+}
 
-  .button {
-    padding: 0;
-    float: right;
-  }
+.bottom {
+  margin-top: 13px;
+  line-height: 12px;
+}
 
-  .image {
-    width: 100%;
-    display: block;
-  }
+.button {
+  padding: 0;
+  float: right;
+}
 
-  .clearfix:before,
-  .clearfix:after {
-    display: table;
-    content: "";
-  }
+.image {
+  width: 100%;
+  display: block;
+}
 
-  .clearfix:after {
-    clear: both
-  }
+.clearfix:before,
+.clearfix:after {
+  display: table;
+  content: "";
+}
 
-  .back-width {
-    background-color: #F8F6EE; /*#2F79F6   #E5E6EB */
-    position: fixed;
-    margin: auto;
-    left: 0;
-    right: 0;
-    top: 130px;
-    width: 100%;
-    height: 550px;
-    margin-bottom: 40px;
-  }
+.clearfix:after {
+  clear: both;
+}
 
-  .login-body {
+.back-width {
+  background-color: #f8f6ee; /*#2F79F6   #E5E6EB */
+  position: fixed;
+  margin: auto;
+  left: 0;
+  right: 0;
+  top: 130px;
+  width: 100%;
+  height: 550px;
+  margin-bottom: 40px;
+}
 
-    background: url("../assets/img/gf.jpg") no-repeat left 50%;
-    font-family: 'Open Sans', sans-serif;
-    background-color: #2469E8;
-    background-size: cover;
+.login-body {
+  background: url("../assets/img/gf.jpg") no-repeat left 50%;
+  font-family: "Open Sans", sans-serif;
+  background-color: #2469e8;
+  background-size: cover;
 
-    /*background-size: cover;
+  /*background-size: cover;
     -webkit-background-size: cover;
     -moz-background-size: cover;
     -o-background-size: cover;*/
-    /*min-height: 1050px;*/
+  /*min-height: 1050px;*/
 
-    position: absolute;
+  position: absolute;
 
-    margin: auto;
-    left: -400px;
-    right: 0;
-    bottom: 0;
-    width: 800px;
-    height: 550px;
-    /*
+  margin: auto;
+  left: -400px;
+  right: 0;
+  bottom: 0;
+  width: 800px;
+  height: 550px;
+  /*
     top: 0;
     right: 0;
     bottom: 0;
     left: 0;*/
-  }
+}
 
-  .login {
-    /*flex: 1;
+.login {
+  /*flex: 1;
     width: 100%;*/
-    position: relative;
-    max-width: 22rem;
-    top: 60px;
-    left: 850px;
-    font-size: 0.875rem;
-    opacity: 0.9;
-
-    &-header {
-      margin-bottom: 1rem;
-
-      .brand {
-        margin: 4.5rem 0 3.5rem;
-        text-align: center;
-        letter-spacing: 0.125rem;
-
-        a {
-          margin: 0;
-          color: $brand-color;
-          font: 300 3rem sans-serif;
-
-          &:hover {
-            color: $brand-hover-color;
-            text-shadow: 0 0 1rem $brand-hover-color;
-          }
+  position: relative;
+  max-width: 22rem;
+  top: 60px;
+  left: 850px;
+  font-size: 0.875rem;
+  opacity: 0.9;
+
+  &-header {
+    margin-bottom: 1rem;
+
+    .brand {
+      margin: 4.5rem 0 3.5rem;
+      text-align: center;
+      letter-spacing: 0.125rem;
+
+      a {
+        margin: 0;
+        color: $brand-color;
+        font: 300 3rem sans-serif;
+
+        &:hover {
+          color: $brand-hover-color;
+          text-shadow: 0 0 1rem $brand-hover-color;
         }
       }
     }
+  }
 
-    &-form {
-      /*margin-bottom: 2.5rem;
+  &-form {
+    /*margin-bottom: 2.5rem;
       padding: 1.875rem 1.25rem;
       background: $login-form-background;*/
-      color: $login-form-color;
+    color: $login-form-color;
 
-      /*.heading {
+    /*.heading {
         margin: 0 0 1rem;
         font-weight: 400;
         font-size: 1.5rem;
       }*/
 
-      .el-button {
-        margin-top: 0.5rem;
-        width: 100%;
-      }
+    .el-button {
+      margin-top: 0.5rem;
+      width: 100%;
     }
-
-
   }
+}
 </style>
 

+ 112 - 3
src/dashoo.cn/frontend_web/src/pages/select/companyselect/index.vue

@@ -75,6 +75,7 @@
         <!--内框表格剩余栏显示-->
         <el-table-column label="准入证号" prop="AccessCardNo" sortable align="center"></el-table-column>
         <el-table-column label="企业名称" prop="SupplierName" sortable align="center"></el-table-column>
+        <el-table-column label="企业曾用名" prop="OldSupplierName" align="center"></el-table-column>
         <el-table-column label="准入类别" prop="SupplierTypeName" align="center"></el-table-column>
         <el-table-column label="法人代表" prop="LegalPerson" align="center"></el-table-column>
         <el-table-column label="注册资金(万元)" prop="RegCapital" width="170px" sortable align="center"></el-table-column>
@@ -421,6 +422,12 @@
             </el-form-item>
           </el-col>
 
+          <el-col :span="12">
+            <el-form-item label="企业曾用名称">
+              <el-input size="mini" v-model="searchForm.OldSupplierName" placeholder="请输入内容"></el-input>
+            </el-form-item>
+          </el-col>
+
           <el-col :span="12">
             <el-form-item label="准入类别">
               <el-select
@@ -472,6 +479,24 @@
               <el-input size="mini" v-model="searchForm.DepositBank" placeholder="请输入内容"></el-input>
             </el-form-item>
           </el-col>
+          <el-col :span="12">
+            <el-form-item label="HSE审查培训">
+              <el-select
+                size="mini"
+                v-model="searchForm.HseTraining"
+                placeholder="请选择"
+                style="width: 100%;"
+              >
+                <el-option
+                  v-for="item in HSEOptions"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                  style="width: 100%"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
         </el-row>
 
         <el-row>
@@ -543,7 +568,7 @@
                 <el-col :span="14">
                   <el-input
                     size="mini"
-                    v-model="searchForm.LinkAddress"
+                    v-model="searchForm.Address"
                     maxlength="500"
                     placeholder="详细地址"
                     style="width: 100%"
@@ -590,6 +615,48 @@
             </el-form-item>
           </el-col>
         </el-row>
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="企业资质">
+              <el-select
+                size="mini"
+                style="width: 100%"
+                v-model="searchForm.NeedFileType"
+                filterable
+                multiple
+                placeholder="请选择"
+              >
+                <el-option
+                  v-for="item in nftOptions"
+                  :key="item.Id"
+                  :label="item.Name"
+                  :value="item.Name"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="准入范围">
+              <el-select
+                size="mini"
+                style="width: 100%"
+                v-model="searchForm"
+                filterable
+                multiple
+                placeholder="请选择"
+              >
+                <el-option
+                  v-for="item in nftOptions"
+                  :key="item.Id"
+                  :label="item.Name"
+                  :value="item.Name"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
       </el-form>
       <span slot="footer" class="dialog-footer">
         <el-button size="mini" @click="dialogVisible = false">取 消</el-button>
@@ -614,9 +681,25 @@ export default {
     // 执行初始化方法
     this.getDictOptions();
     this.initDatas();
+    this.initNftOptions();
   },
   data() {
     return {
+      HSEOptions: [
+        {
+          value: "",
+          label: "全部"
+        },
+        {
+          value: 1,
+          label: "是"
+        },
+        {
+          value: 0,
+          label: "否"
+        }
+      ],
+      nftOptions: [],
       CityAry: [],
       LinkCityAry: [],
       countryprops: {
@@ -697,7 +780,10 @@ export default {
         LinkStreet: "",
         LinkAddress: "",
         DepositBank: "",
-        BusinessScope: ""
+        BusinessScope: "",
+        OldSupplierName: "",
+        HseTraining: "",
+        NeedFileType: []
       },
       //列表排序
       Column: {
@@ -709,6 +795,16 @@ export default {
   },
 
   methods: {
+    initNftOptions() {
+      api
+        .getNFTOptions(this.$axios)
+        .then(res => {
+          this.nftOptions = res.data.items;
+        })
+        .catch(err => {
+          console.error(err);
+        });
+    },
     handleLinkAreaChange(value) {
       this.searchForm.LinkProvince = value[0];
       this.searchForm.LinkCity = value[1];
@@ -840,8 +936,21 @@ export default {
         Order: this.Column.Order,
         Prop: this.Column.Prop,
         SetupTime: this.searchForm.SetupTime,
+        Province: this.searchForm.Province,
+        City: this.searchForm.City,
+        Street: this.searchForm.Street,
+        Address: this.searchForm.Address,
+        LinkProvince: this.searchForm.LinkProvince,
+        LinkCity: this.searchForm.LinkCity,
+        LinkStreet: this.searchForm.LinkStreet,
+        LinkAddress: this.searchForm.LinkAddress,
+        DepositBank: this.searchForm.DepositBank,
+        BusinessScope: this.searchForm.BusinessScope,
+        OldSupplierName: this.searchForm.OldSupplierName,
+        HseTraining: this.searchForm.HseTraining,
+        NeedFileType: this.searchForm.NeedFileType
       };
-
+      console.log(this.searchForm.NeedFileType);
       api
         .getCompanyList(params, this.searchForm, this.$axios)
         .then(res => {