Browse Source

前后:供方信息查询和已入库 查询和导出加管理单位

wd 4 năm trước cách đây
mục cha
commit
a82b552e22

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

@@ -113,7 +113,7 @@ func (s *SelectService) GetMyPagingEntitiesWithOrderBytblForExport(supplierTable
 	// TODO 推荐单位不从供方注册表取
 	var sql string
 	sql = `select SQL_CALC_FOUND_ROWS a.Id,a.SupplierName,b.AccessCardNo, a.OldSupplierName, b.SupplierTypeCode, b.CreateOn as CreateOn, `
-	sql += `a.LegalPerson,a.RegCapital,a.Mobile,b.AuditDate,b.ApplyTime,b.EffectEndTime,b.InFlag,a.ContactName,a.CommercialNo, `
+	sql += `a.LegalPerson,a.RegCapital,a.Mobile,a.MgrUnit,b.AuditDate,b.ApplyTime,b.EffectEndTime,b.InFlag,a.ContactName,a.CommercialNo, `
 	sql += `a.DepositBank,a.HseTraining,a.CompanyType,a.SetupTime,a.Address,a.Province,a.City,a.Street, a.Grade, a.OperType, `
 	sql += `a.LinkAddress,a.LinkProvince,a.LinkCity,a.LinkStreet,a.BusinessScope, `
 	sql += `b.InStyle, b.Id CertId, f.FullName, b.RecUnitName as CheckUnitName, b.Remark `

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

@@ -410,6 +410,7 @@ type OilSupplierSelect struct {
 	OldSupplierName  string    //企业曾用名
 	SupplierTypeCode string    //准入类别编号
 	Grade            string    //级别
+	MgrUnit          string    //管理单位
 	OperType         string    //供应商类型
 	LegalPerson      string    //法定代表人姓名
 	RegCapital       float64   //注册资本

+ 9 - 2
src/dashoo.cn/backend/api/controllers/oilsupplier/select.go

@@ -103,6 +103,10 @@ func (this *SelectController) GetTList() {
 		where = where + " and b.AccessCardNo like '%" + model.AccessCardNo + "%'"
 	}
 
+	if model.MgrUnit != "" {
+		where = where + " and a.MgrUnit like '%" + model.MgrUnit + "%'"
+	}
+
 	//企业名称
 	if model.SupplierName != "" {
 		where = where + " and a.SupplierName like '%" + model.SupplierName + "%'"
@@ -332,6 +336,9 @@ func (this *SelectController) ExportCompanyList() {
 		if model.AccessCardNo != "" {
 			where = where + " and b.AccessCardNo like '%" + model.AccessCardNo + "%'"
 		}
+		if model.MgrUnit != "" {
+			where = where + " and a.MgrUnit like '%" + model.MgrUnit + "%'"
+		}
 
 		//企业名称
 		if model.SupplierName != "" {
@@ -503,7 +510,7 @@ func (this *SelectController) ExportCompanyList() {
 
 	fileTitle := "供方信息表"
 	//自定义显示列
-	title := strings.Split("企业名称,准入证号,准入类别,准入方式,状态,有效日期,企业曾用名,级别,供应商类型,法人代表,注册资金,联系人,"+
+	title := strings.Split("企业名称,准入证号,准入类别,准入方式,状态,有效日期,企业曾用名,级别,管理单位,供应商类型,法人代表,注册资金,联系人,"+
 		"移动电话,统一社会信用代码,开户银行,公司类型,成立时间,推荐单位,专业处室,申请时间,注册地址,通信地址,营业范围,企业资质,备注", ",")
 
 	f := xlsx.NewFile()
@@ -566,7 +573,7 @@ func (this *SelectController) ExportCompanyList() {
 		} else {
 			dataArr = append(dataArr, "")
 		}
-
+		dataArr = append(dataArr, item.MgrUnit)
 		if item.OperType == "制造商" {
 			dataArr = append(dataArr, item.OperType)
 		} else {

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

@@ -1367,7 +1367,7 @@ func (this *OilSupplierController) ExportStoreList() {
 	svc.GetMyPagingEntitiesWithOrderBytbl2(OilSupplierName, OilSupplierCertName, 1, 5000, orderby, asc, &list, where, Code, Ids.Ids)
 
 	fileTitle := "已入库"
-	showColumnArr := "序号,准入标识,准入证编号,准入类别,企业名称,有效期,工商注册号,省市县,单位地址,注册资本,币种,联系人姓名,公司类型,成立时间,开户银行,银行账号,电子邮箱,银行信用等级,移动电话,固定电话,传真,公司电话,备注"
+	showColumnArr := "序号,准入标识,准入证编号,准入类别,企业名称,管理单位,有效期,工商注册号,省市县,单位地址,注册资本,币种,联系人姓名,公司类型,成立时间,开户银行,银行账号,电子邮箱,银行信用等级,移动电话,固定电话,传真,公司电话,备注"
 
 	f := xlsx.NewFile()
 	sheet, _ := f.AddSheet(fileTitle)
@@ -1385,7 +1385,7 @@ func (this *OilSupplierController) ExportStoreList() {
 		} else if item.InFlag == "3" {
 			inStyle = "取消"
 		}
-		dataString := strconv.Itoa(idx+1) + "," + inStyle + "," + item.AccessCardNo + "," + item.SupplierTypeName + "," + item.SupplierName + "," +
+		dataString := strconv.Itoa(idx+1) + "," + inStyle + "," + item.AccessCardNo + "," + item.SupplierTypeName + "," + item.SupplierName + "," + item.MgrUnit + "," +
 			utils.ToStr(item.ApplyTime.Format("2006-01-02")) + "," + item.CommercialNo + "," + item.AllAddress + "," + item.Address + "," + regCapital + "," + item.Currency + "," + item.ContactName + "," + item.CompanyType + "," + utils.ToStr(item.SetupTime.Format("2006-01-02")) + "," + item.DepositBank + "," + item.BankAccount + "," + item.EMail + "," + item.BankCreditRating + "," + item.Mobile + "," + item.Telphone + "," + item.Fax + "," + item.CompanyTel + "," + item.Remark
 		cellName := strings.Split(dataString, ",")
 		row := sheet.AddRow()

+ 18 - 6
src/dashoo.cn/frontend_web/src/pages/select/companyselect/index.vue

@@ -555,6 +555,15 @@
               </el-select>
             </el-form-item>
           </el-col>
+          <el-col :span="12">
+            <el-form-item label="管理单位" >
+              <el-select size="mini" filterable v-model="searchForm.MgrUnit" maxlength="255"  clearable placeholder="请输入" style="width: 100%">
+                <el-option  v-for="item in ManagementUnitOptions" :key="item.Value" :label="item.Key"
+                            :value="item.Key">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
           <el-col :span="12">
             <el-form-item label="供应商类型">
               <el-select
@@ -586,12 +595,6 @@
               <el-input size="mini" v-model="searchForm.CommercialNo" placeholder="请输入内容"></el-input>
             </el-form-item>
           </el-col>
-
-          <el-col :span="12">
-            <el-form-item label="开户银行">
-              <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-->
@@ -697,6 +700,13 @@
           </el-col>
 
         </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="开户银行">
+              <el-input size="mini" v-model="searchForm.DepositBank" placeholder="请输入内容"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
         <el-row>
 
           <el-col :span="24">
@@ -1435,6 +1445,7 @@ export default {
       InFlag: '',
       // 定义列表数据
       entityList: [],
+      ManagementUnitOptions: [],
       // 分页参数
       sizeSub: 10,
       currentPageSub: 1,
@@ -1857,6 +1868,7 @@ export default {
           this.dictData = res.data.items
           this.CompanyTypeOptions = this.dictData['CompanyType']
           this.getCityList(this.dictData['GaodeMapChinaAreas'])
+          this.ManagementUnitOptions = this.dictData['ManagementUnit']
         })
         .catch(err => {
           console.error(err)