Browse Source

fix: 导出筛选

hsun 2 years ago
parent
commit
18df67c1b0
1 changed files with 3 additions and 2 deletions
  1. 3 2
      controller/contract/register.go

+ 3 - 2
controller/contract/register.go

@@ -794,10 +794,11 @@ func (rg *RegisterController) Export(c *gin.Context) {
 
 	cond := `1 = 1`
 	pars := make([]interface{}, 0)
+	// 合同编号/客户姓名/销售/代付方
 	if req.Keyword != "" {
 		kw := "%" + req.Keyword + "%"
-		cond += ` AND (company_name LIKE ? OR contract_code LIKE ? OR seller_name LIKE ?)`
-		pars = append(pars, kw, kw, kw)
+		cond += ` AND (company_name LIKE ? OR contract_code LIKE ? OR seller_name LIKE ? OR pay_company_name LIKE ?)`
+		pars = append(pars, kw, kw, kw, kw)
 	}
 	if req.StartDate != "" && req.EndDate != "" {
 		st := fmt.Sprint(req.StartDate, " 00:00:00")