Browse Source

修改接口 修改查询选项为下拉菜单

Liuqi 6 years ago
parent
commit
41edc76442

+ 16 - 12
src/dashoo.cn/backend/api/controllers/oilsupplier/select.go

@@ -78,7 +78,8 @@ func (this *SelectController) GetTList() {
 	asc := true
 	Order := this.GetString("Order")
 	Prop := this.GetString("Prop")
-
+	CheckUId := this.GetString("CheckUId")
+	FullId := this.GetString("FullId")
 	if Order != "" && Prop != "" {
 		orderby = Prop
 		if Order == "desc" {
@@ -98,11 +99,11 @@ func (this *SelectController) GetTList() {
 	if model.OldSupplierName != "" {
 		where = where + " and OldSupplierName like '%" + model.OldSupplierName + "%'"
 	}
-	if model.FullName != "" {
-		where = where + " and f.FullName like '%" + model.FullName + "%'"
+	if FullId != "" {
+		where = where + " and f.Id = '" + FullId + "'"
 	}
-	if model.CheckUnitName != "" {
-		where = where + " and g.CheckUnitName like '%" + model.CheckUnitName + "%'"
+	if CheckUId != "" {
+		where = where + " and g.CheckUnitId = '" + CheckUId + "'"
 	}
 
 	//准入类别(基建,物资,技术服务)
@@ -261,16 +262,19 @@ func (this *SelectController) GetBaseInfo() {
 		var infoInte supplier.OilSupplierInte
 		where := " where 1 = 1 AND a.SupplierName = '" + item + "'"
 		svc.GetInfoByCompId(where,&infoInte.SupplierInfo)
+		if infoInte.SupplierInfo.SupplierName != "" {
 
-		//var suplliersup []supplier.OilSupplierCertSubInte
-		where = "where SupplierId=" + strconv.Itoa(infoInte.SupplierInfo.Id) + " and SupplierTypeCode='01'"
-		svc.Getoilsuppliercertsub(OilSupplierCertSubName, where, &infoInte.WZsub)
+			//var suplliersup []supplier.OilSupplierCertSubInte
+			where = "where SupplierId=" + strconv.Itoa(infoInte.SupplierInfo.Id) + " and SupplierTypeCode='01'"
+			svc.Getoilsuppliercertsub(OilSupplierCertSubName, where, &infoInte.WZsub)
 
-		where = "where SupplierId=" + strconv.Itoa(infoInte.SupplierInfo.Id) + " and SupplierTypeCode='02'"
-		svc.Getoilsuppliercertsub(OilSupplierCertSubName, where, &infoInte.JSsub)
+			where = "where SupplierId=" + strconv.Itoa(infoInte.SupplierInfo.Id) + " and SupplierTypeCode='02'"
+			svc.Getoilsuppliercertsub(OilSupplierCertSubName, where, &infoInte.JSsub)
 
-		where = "where SupplierId=" + strconv.Itoa(infoInte.SupplierInfo.Id) + " and SupplierTypeCode='03'"
-		svc.Getoilsuppliercertsub(OilSupplierCertSubName, where, &infoInte.JFsub)
+			where = "where SupplierId=" + strconv.Itoa(infoInte.SupplierInfo.Id) + " and SupplierTypeCode='03'"
+			svc.Getoilsuppliercertsub(OilSupplierCertSubName, where, &infoInte.JFsub)
+
+		}
 		infoIntelist = append(infoIntelist, infoInte)
 	}
 

+ 45 - 5
src/dashoo.cn/frontend_web/src/pages/select/companyselect/index.vue

@@ -566,12 +566,22 @@
         <el-row>
         <el-col :span="12">
           <el-form-item label="推荐单位">
-            <el-input size="mini" v-model="searchForm.CheckUnitName" placeholder="请输入内容"></el-input>
+            <el-select size="mini" v-model="auditorg"  filterable placeholder="请选择审核单位"
+                        ref="auditorgselect" style="width: 100%;">
+              <el-option v-for="item in orgOptions" :key="item.Id" :label="item.Fullname" :value="item.Id"
+                          style="width: 100%">
+              </el-option>
+            </el-select>
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item label="专业科室(审批)">
-            <el-input size="mini" v-model="searchForm.FullName" placeholder="请输入内容"></el-input>
+          <el-form-item label="专业处室">
+            <el-select size="mini"  v-model="selectDept" filterable
+                        placeholder="请选择专业处室" style="width: 100%">
+              <el-option  v-for="item in allorgunitOptions" :key="item.Id" :label="item.Fullname"
+                          :value="item.Id">
+              </el-option>
+            </el-select>
           </el-form-item>
         </el-col>
         </el-row>
@@ -770,6 +780,7 @@
 
 
 <script>
+import api2 from '@/api/oilsupplier/supplier'
 import api from '@/api/oilsupplier/select'
 import FileSaver from 'file-saver'
 import XLSX from 'xlsx'
@@ -787,6 +798,8 @@ export default {
     this.getDictOptions()
     this.initDatas()
     this.initNftOptions()
+    this.GetorgOptions()
+    this.getDictOptions2()
     // watermark.set("大港油田企业法规处")
   },
   data () {
@@ -800,6 +813,10 @@ export default {
       dialogVisibleSubFile: false,
       loading: false,
       Spesearch: '',
+      orgOptions: [],
+      auditorg: '',
+      selectDept: '',
+      allorgunitOptions: [],
       HSEOptions: [
         {
           value: '',
@@ -907,7 +924,8 @@ export default {
         NeedFileType: '',
         CerSubName: '',
         FullName: '',
-        CheckUnitName: ''
+        CheckUserName: '',
+        CheckUserId: ''
       },
       searchFormSub: {
         Code: '',
@@ -973,6 +991,23 @@ export default {
         return val
       }
     },
+    GetorgOptions () {
+      let _this = this
+      this.$axios.get('/register/orgloginlist').then(res => {
+        _this.orgOptions = res.data.items
+      }).catch(err => {
+        console.log(err)
+      })
+    },
+    getDictOptions2() {
+      let params = {
+      }
+      api2.getDictListByStatus(params, this.$axios).then(res => {
+        this.allorgunitOptions = res.data.items['Allunitorglist']
+      }).catch(err => {
+        console.error(err)
+      })
+    },
     initNftOptions () {
       api
         .getNFTOptions(this.$axios)
@@ -1146,7 +1181,9 @@ export default {
         Order: this.Column.Order,
         Prop: this.Column.Prop,
         SetupTime: this.SetupTime,
-        CreateOn: myCreateOn.join(',')
+        CreateOn: myCreateOn.join(','),
+        CheckUId: this.auditorg,
+        FullId: this.selectDept
       }
       api
         .getCompanyList(params, this.searchForm, this.$axios)
@@ -1159,6 +1196,7 @@ export default {
           console.error(err)
         })
     },
+    //预留接口
     ssearch(){
       let params = {
         Spesearch: this.Spesearch
@@ -1204,6 +1242,8 @@ export default {
       Object.assign(this.searchForm, this.searchFormReset)
       this.CityAry = []
       this.SetupTime = '';
+      this.auditorg = '',
+      this.selectDept = '',
       (this.LinkCityAry = []), (this.currentPage = 1)
       this.initDatas()
     },