Browse Source

已缴费页面加筛选

wd 4 years ago
parent
commit
f05fd5b94c
1 changed files with 24 additions and 0 deletions
  1. 24 0
      src/dashoo.cn/backend/api/controllers/oilsupplier/paymentinfo.go

+ 24 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/paymentinfo.go

@@ -45,8 +45,23 @@ func (this *PaymentInfoController) GetEntityList() {
 	orderby := "p.Id"
 	where := " 1=1 "
 	asc := " DESC"
+	Order := this.GetString("Order")
+	Prop := this.GetString("Prop")
+	if Order != "" && Prop != "" {
+		if Prop == "SupplierName" {
+			Prop = "s.SupplierName"
+		}
+		if Prop == "Remark" {
+			Prop = "p.Remark"
+		}
+		orderby = Prop
+		asc = " " + Order
+	}
 	SupplierTypeCode := this.GetString("SupplierTypeCode")
 	SupplierName := this.GetString("SupplierName")
+	PayDate := this.GetString("PayDate")
+	PayType := this.GetString("PayType")
+	BankSerialNum := this.GetString("BankSerialNum")
 	IsPay := this.GetString("IsPay")
 	IsInvoice := this.GetString("IsInvoice")
 
@@ -66,6 +81,15 @@ func (this *PaymentInfoController) GetEntityList() {
 	if SupplierName != "" {
 		where = where + " and s.SupplierName like '%" + SupplierName + "%'"
 	}
+	if BankSerialNum != "" {
+		where = where + " and p.BankSerialNum like '%" + BankSerialNum + "%'"
+	}
+	if PayDate != "" {
+		where = where + " and p.PayDate like '" + PayDate + "%'"
+	}
+	if PayType != "" {
+		where = where + " and p.PayType = '" + PayType + "'"
+	}
 	//svc := suppliercert.GetOilSupplierCertService(utils.DBE)
 	//var list []suppliercert.OilSupplierCert