Przeglądaj źródła

前后:业务流程查询没有流程的不展示;供方信息高级查询

dubch 4 lat temu
rodzic
commit
8170b2b506

+ 5 - 1
src/dashoo.cn/backend/api/business/oilsupplier/infochange/infochangeService.go

@@ -245,7 +245,11 @@ func (s *InfoChangeService) GetProcessInfoWithOrderBytbl(tableName string, pageI
 	var resultsSlice []map[string][]byte
 
 	//获取总记录数
-	sqlCount := `select count(*) from ` + tableName
+	sqlCount := `select count(*) from ` + tableName + ` a `
+	sqlCount += ` LEFT JOIN Base_User u ON a.CreateUserId = u.Id`
+	sqlCount += ` Left join OilSupplier s on a.SupplierId = s.Id
+			left join Base_User uu on s.CreateUserId = uu.Id
+			left join OilCorporateInfo c on s.CreateUserId = c.UserId `
 	sqlCount += ` where ` + where
 
 	var sql string

+ 24 - 10
src/dashoo.cn/backend/api/controllers/oilsupplier/select.go

@@ -82,8 +82,9 @@ func (this *SelectController) GetTList() {
 	orderby := "a.Id"
 	asc := true
 	Order := this.GetString("Order")
-	InFlag := this.GetString("InFlag")
 	Prop := this.GetString("Prop")
+	OperType := this.GetString("OperType")
+	Grade := this.GetString("Grade")
 	CheckUId := this.GetString("CheckUId")
 	FullId := this.GetString("FullId")
 	if Order != "" && Prop != "" {
@@ -98,10 +99,6 @@ func (this *SelectController) GetTList() {
 		where = where + " and b.AccessCardNo like '%" + model.AccessCardNo + "%'"
 	}
 
-	if InFlag != "" {
-		where = where + " and b.InFlag = " + InFlag
-	}
-
 	//企业名称
 	if model.SupplierName != "" {
 		where = where + " and a.SupplierName like '%" + model.SupplierName + "%'"
@@ -141,6 +138,23 @@ func (this *SelectController) GetTList() {
 	if model.DepositBank != "" {
 		where = where + " and a.DepositBank like '%" + model.DepositBank + "%'"
 	}
+
+	if OperType == "1" {
+		OperType = "制造商"
+	} else if OperType == "2" {
+		OperType = "代理商"
+	} else if OperType == "3" {
+		OperType = "贸易商"
+	}
+	//准入状态
+	if OperType != "" {
+		where = where + " and a.OperType = '" + OperType + "'"
+	}
+	//级别
+	if Grade != "" {
+		where = where + " and a.Grade = '" + Grade + "'"
+	}
+
 	//HSE审查
 	if model.HseTraining != "" {
 		where = where + " and a.HseTraining = '" + model.HseTraining + "'"
@@ -472,7 +486,7 @@ func (this *SelectController) GetProcessAuditList() {
 
 	//获取分页信息
 	page := this.GetPageInfoForm()
-	where := " 1=1 "
+	where := " 1=1 and b.WorkflowId != '' and b.WorkflowId != '0' "
 	orderby := "Id"
 	asc := false
 	Order := this.GetString("Order")
@@ -520,7 +534,7 @@ func (this *SelectController) GetProcessAuditList() {
 		//datainfo.Items = processinfolist
 	}
 	if tabinx == "2" || tabinx == "0" {
-		whereapp := "1=1"
+		whereapp := "1=1 and a.WorkflowId != '' and a.WorkflowId != '0'"
 		//企业用户必须加创建人条件
 		if this.User.IsCompanyUser == 1 {
 			whereapp = whereapp + " and a.CreateUserId = '" + this.User.Id + "'"
@@ -546,7 +560,7 @@ func (this *SelectController) GetProcessAuditList() {
 		//datainfo.Items = processinfolist
 	}
 	if tabinx == "3" || tabinx == "0" {
-		whereapp := "1=1"
+		whereapp := "1=1 and a.WorkflowId != '' and a.WorkflowId != '0'"
 		//企业用户必须加创建人条件
 		if this.User.IsCompanyUser == 1 {
 			whereapp = whereapp + " and a.CreateUserId = '" + this.User.Id + "'"
@@ -572,7 +586,7 @@ func (this *SelectController) GetProcessAuditList() {
 		//datainfo.Items = processinfolist
 	}
 	if tabinx == "4" || tabinx == "0" {
-		whereapp := "1=1"
+		whereapp := "1=1 and a.WorkflowId != '' and a.WorkflowId != '0'"
 		//企业用户必须加创建人条件
 		if this.User.IsCompanyUser == 1 {
 			whereapp = whereapp + " and a.CreateUserId = '" + this.User.Id + "'"
@@ -595,7 +609,7 @@ func (this *SelectController) GetProcessAuditList() {
 		//datainfo.Items = processinfolist
 	}
 	if tabinx == "5" {
-		whereapp := "1=1"
+		whereapp := "1=1 and WorkflowId != '' and WorkflowId != '0'"
 		//企业用户必须加创建人条件
 		if this.User.IsCompanyUser == 1 {
 			whereapp = whereapp + " and CreateUserId = '" + this.User.Id + "'"

+ 55 - 4
src/dashoo.cn/frontend_web/src/pages/select/companyselect/index.vue

@@ -43,7 +43,7 @@
             </el-select>
           </el-form-item>
           <el-form-item label="准入状态">
-            <el-select size="mini" style="width:80px" v-model="InFlag" placeholder="准入状态">
+            <el-select size="mini" style="width:80px" v-model="searchForm.InFlag" placeholder="准入状态">
               <el-option label="全部" value=""></el-option>
               <el-option label="准入" value="1"></el-option>
               <el-option label="暂停" value="2"></el-option>
@@ -510,6 +510,7 @@
                 clearable
                 v-model="searchForm.SupplierTypeCode"
                 placeholder="请选择"
+                @change="changeType"
               >
                 <el-option label="物资类" value="01"></el-option>
                 <el-option label="基建类" value="02"></el-option>
@@ -532,6 +533,39 @@
               </el-select>
             </el-form-item>
           </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="级别">
+              <el-select
+                size="mini"
+                style="width:100%"
+                v-model="Grade"
+                placeholder="请选择"
+                :disabled="hidden"
+              >
+                <el-option label="全部" value=""></el-option>
+                <el-option label="一级" value="1"></el-option>
+                <el-option label="二级" value="2"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="供应商类型">
+              <el-select
+                size="mini"
+                style="width:100%"
+                v-model="OperType"
+                placeholder="请选择"
+                :disabled="hidden"
+              >
+                <el-option label="全部" value=""></el-option>
+                <el-option label="制造商" value="1"></el-option>
+                <el-option label="代理商" value="2"></el-option>
+                <el-option label="贸易商" value="3"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+
           <el-col :span="12">
             <el-form-item label="法人">
               <el-input size="mini" v-model="searchForm.LegalPerson" placeholder="请输入内容"></el-input>
@@ -1283,7 +1317,7 @@ export default {
       let companySearchParams = window.localStorage.getItem('companySearchParams')
       if (companySearchParams !== '' && companySearchParams !== null) {
         let searchForm = JSON.parse(companySearchParams)
-        this.InFlag = searchForm.InFlag
+        // this.InFlag = searchForm.InFlag
         this.searchForm = searchForm
       }
     }
@@ -1407,6 +1441,9 @@ export default {
       SetupTime: '', // 成立时间
       CreateOn: [],
       ssList: [],
+      OperType: '',
+      Grade: '',
+      hidden: true,
       searchForm: {
         AccessCardNo: '',
         SupplierName: '',
@@ -1659,6 +1696,15 @@ export default {
           console.error(err)
         })
     },
+    changeType () {
+      if (this.searchForm.SupplierTypeCode === '01') {
+        this.hidden = false
+      } else {
+        this.OperType = ''
+        this.Grade = ''
+        this.hidden = true
+      }
+    },
     changeTypeCode () {
       let params = {
         Type: this.importData.Type
@@ -2004,7 +2050,7 @@ export default {
         this.currentPage = 1
         if (process.client) {
           let searchForm = this.searchForm
-          searchForm.InFlag = searchForm.InFlag === '' ? this.InFlag : searchForm.InFlag
+          // searchForm.InFlag = searchForm.InFlag === '' ? this.InFlag : searchForm.InFlag
           window.localStorage.setItem('companySearchParams', JSON.stringify(searchForm)) // 供方信息查询参数
         }
         this.dialogVisible = false
@@ -2027,7 +2073,9 @@ export default {
         SetupTime: this.SetupTime,
         CreateOn: myCreateOn.join(','),
         CheckUId: this.auditorg,
-        InFlag: this.InFlag,
+        // InFlag: this.InFlag,
+        OperType: this.OperType,
+        Grade: this.Grade,
         FullId: this.selectDept
       }
       api
@@ -2092,6 +2140,9 @@ export default {
       this.SetupTime = ''
       this.auditorg = ''
       this.selectDept = ''
+      this.OperType = ''
+      this.hidden = true
+      this.Grade = ''
       this.LinkCityAry = []
       this.currentPage = 1
       this.initDatas()