|
@@ -40,7 +40,7 @@ func (rg *PrePaymentController) List(c *gin.Context) {
|
|
|
|
|
|
cond := `1 = 1`
|
|
|
pars := make([]interface{}, 0)
|
|
|
- // 合同编号/客户姓名/销售/实际使用方
|
|
|
+ // 客户姓名/销售
|
|
|
if req.Keyword != "" {
|
|
|
kw := "%" + req.Keyword + "%"
|
|
|
cond += ` AND (company_name LIKE ? OR seller_name LIKE ? )`
|
|
@@ -53,6 +53,19 @@ func (rg *PrePaymentController) List(c *gin.Context) {
|
|
|
pars = append(pars, st, ed)
|
|
|
}
|
|
|
|
|
|
+ // 货币列表
|
|
|
+ currencyOB := new(fms.CurrencyUnit)
|
|
|
+ currencyCond := `enable = 1`
|
|
|
+ currencyPars := make([]interface{}, 0)
|
|
|
+ currencyList, e := currencyOB.List(currencyCond, currencyPars)
|
|
|
+ if e != nil {
|
|
|
+ resp.FailMsg("获取失败", "获取货币列表失败, Err: "+e.Error(), c)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ unitMap := make(map[string]string)
|
|
|
+ for i := range currencyList {
|
|
|
+ unitMap[currencyList[i].Code] = currencyList[i].UnitName
|
|
|
+ }
|
|
|
|
|
|
page := new(base.Page)
|
|
|
page.SetPageSize(req.PageSize)
|
|
@@ -65,9 +78,8 @@ func (rg *PrePaymentController) List(c *gin.Context) {
|
|
|
resp.FailMsg("获取失败", "获取预登记列表失败, Err: "+e.Error(), c)
|
|
|
return
|
|
|
}
|
|
|
- registerIds := make([]int, 0)
|
|
|
for i := range list {
|
|
|
- registerIds = append(registerIds, list[i].ContractRegisterId)
|
|
|
+ list[i].UnitName = unitMap[list[i].CurrencyUnit]
|
|
|
}
|
|
|
|
|
|
page.SetTotal(total)
|