Przeglądaj źródła

前后:找回密码bug;检查资质加筛选

dubch 4 lat temu
rodzic
commit
50086f5ae4

+ 2 - 0
src/dashoo.cn/backend/api/business/oilsupplier/supplierfile/supplierfile.go

@@ -66,6 +66,8 @@ type CheckFile struct {
 	CertId            string
 	SupplierId        int
 	Grade        	  string
+	FileName       	  string
+	SubName       	  string
 	CurrentPage       int64
 	Size        	  int64
 	Table        	  int 	"1准入,2增项,3年审,4信息变更"

+ 10 - 4
src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go

@@ -3290,12 +3290,18 @@ func (this *OilSupplierController) CheckSupplierFileList() {
 	}
 	var certSubList1 []suppliercertsub.OilSupplierCertSub
 	var total int64
+	where3 := "IsQuestion = 2 and SupplierId = "+strconv.Itoa(supplierEntity.Id)
+	if file.FileName != "" {
+		where3 += " and LackFile like '%" + file.FileName + "%'"
+	}
+	if file.SubName != "" {
+		where3 += " and Name like '%" + file.SubName + "%'"
+	}
 	if file.CertId != "0" {
-		total = certsubService.GetPagingEntitiesWithOrderBytbl("", file.CurrentPage, file.Size, "Id", true, &certSubList1, "IsQuestion = 2 and SupplierId = "+strconv.Itoa(supplierEntity.Id)+" and SupplierCertId = "+file.CertId)
-	} else {
-		total = certsubService.GetPagingEntitiesWithOrderBytbl("", file.CurrentPage, file.Size, "Id", true, &certSubList1, "IsQuestion = 2 and SupplierId = "+strconv.Itoa(supplierEntity.Id))
-
+		where3 += " and SupplierCertId = "+file.CertId
 	}
+	total = certsubService.GetPagingEntitiesWithOrderBytbl("", file.CurrentPage, file.Size, "Id", true, &certSubList1, where3)
+
 	var datainfo DataInfo
 	datainfo.CurrentItemCount = total
 	datainfo.PageIndex = file.CurrentPage

+ 2 - 2
src/dashoo.cn/backend/api/controllers/register/oilcorporateinfo.go

@@ -768,9 +768,9 @@ func (this *OilCorporateInfoController) GetCode() {
 	mobile := strings.Trim(this.GetString("mobile"), " ")
 
 	var registerEntity register.OilCorporateInfo
-	svcRegister.GetEntity(&registerEntity, "UserName='"+userName+"'")
+	svcRegister.GetEntity(&registerEntity, "CheckStatus = 11 and UserName='"+userName+"'")
 	if userName == "" || registerEntity.UserName == "" {
-		errinfo.Message = "用户名不存在,请重新确认!"
+		errinfo.Message = "用户名不存在或正在注册审批中,请重新确认!"
 		errinfo.Code = -1
 		this.Data["json"] = &errinfo
 		this.ServeJSON()

Plik diff jest za duży
+ 1 - 1
src/dashoo.cn/doc/各种导出sql.sql


+ 21 - 4
src/dashoo.cn/frontend_web/src/components/oilsupplier/checkFile.vue

@@ -2,10 +2,21 @@
   <div>
     <el-dialog title="缺资质准入范围" :visible.sync="checkFileListShow" :close-on-click-modal="false" width="80%">
       <el-card class="box-card" style="height: calc(100vh - 115px);">
-        <div slot="header">
-          <span style="float: right; margin-top: -10px">
-            <el-button type="primary" :loading="deleteLoading" size="mini" @click="deleteData('')">批量删除</el-button>
-          </span>
+        <div slot="header" style="height: 20px">
+          <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
+            <el-form-item label="准入范围">
+              <el-input v-model="subName" placeholder="请输入准入范围" size="mini" clearable></el-input>
+            </el-form-item>
+            <el-form-item label="资质">
+              <el-input v-model="fileName" placeholder="请输入资质" size="mini" clearable></el-input>
+            </el-form-item>
+            <el-form-item>
+              <el-button type="primary" size="mini" @click="initData()">查询</el-button>
+            </el-form-item>
+            <el-form-item>
+              <el-button type="primary" :loading="deleteLoading" size="mini" @click="deleteData('')">批量删除</el-button>
+            </el-form-item>
+          </el-form>
         </div>
         <el-table :data="subList" border height="calc(100vh - 243px)" size="mini" style="width: 100%" v-loading="tableLoading" highlight-current-row @selection-change="handleSelectionChange">
           <el-table-column type="selection" width="55"></el-table-column>
@@ -62,6 +73,8 @@ export default {
       currentPage: 1,
       currentItemCount: 0,
       type: 0,
+      fileName: '',
+      subName: '',
       tableLoading: false,
       checkFileListShow: false,
       deleteLoading: false
@@ -73,6 +86,8 @@ export default {
   methods: {
     getValue (supplierId, certId, operType) {
       this.currentPage = 1
+      this.fileName = ''
+      this.subName = ''
       this.size = 10
       this.certId = certId
       this.operType = operType
@@ -87,6 +102,8 @@ export default {
           size: this.size,
           Type: this.operType,
           SupplierId: this.supplierId,
+          FileName: this.fileName,
+          SubName: this.subName,
           CertId: this.certId.toString()
         }
         api.checkSupplierFileList(fileType, this.$axios).then(res => {

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików