|
@@ -162,6 +162,14 @@ func (this *EtaBusinessController) PageList() {
|
|
|
cond += fmt.Sprintf(` AND %s = ?`, eta_business.EtaBusinessColumns.IndustryId)
|
|
|
pars = append(pars, industryId)
|
|
|
}
|
|
|
+
|
|
|
+ // 国家
|
|
|
+ nation := this.GetString("Nation", "")
|
|
|
+ nation = strings.TrimSpace(nation)
|
|
|
+ if nation != "" {
|
|
|
+ cond += ` AND nation = ? `
|
|
|
+ pars = append(pars, nation)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
order := ``
|
|
@@ -228,6 +236,7 @@ func (this *EtaBusinessController) PageList() {
|
|
|
b.ExpiredTime = utils.TimeTransferString(utils.FormatDate, v.ExpiredTime)
|
|
|
b.CreateTime = v.CreateTime.Format(utils.FormatDateTime)
|
|
|
b.ModifyTime = v.ModifyTime.Format(utils.FormatDateTime)
|
|
|
+ b.Nation = v.Nation
|
|
|
items = append(items, b)
|
|
|
}
|
|
|
|
|
@@ -291,15 +300,18 @@ func (this *EtaBusinessController) Add() {
|
|
|
return
|
|
|
}
|
|
|
req.Province = strings.TrimSpace(req.Province)
|
|
|
- if req.Province == "" {
|
|
|
- br.Msg = "省份不可为空"
|
|
|
- return
|
|
|
- }
|
|
|
- req.City = strings.TrimSpace(req.City)
|
|
|
- if req.City == "" {
|
|
|
- br.Msg = "城市不可为空"
|
|
|
- return
|
|
|
+ if req.Nation == "" {
|
|
|
+ if req.Province == "" {
|
|
|
+ br.Msg = "省份不可为空"
|
|
|
+ return
|
|
|
+ }
|
|
|
+ req.City = strings.TrimSpace(req.City)
|
|
|
+ if req.City == "" {
|
|
|
+ br.Msg = "城市不可为空"
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
req.Leader = strings.TrimSpace(req.Leader)
|
|
|
if req.Leader == "" {
|
|
|
br.Msg = "决策人不可为空"
|
|
@@ -431,6 +443,7 @@ func (this *EtaBusinessController) Add() {
|
|
|
businessItem.ExpiredTime = expiredTime
|
|
|
businessItem.CreateTime = now
|
|
|
businessItem.ModifyTime = now
|
|
|
+ businessItem.Nation = req.Nation
|
|
|
contractItem := new(eta_business.EtaBusinessContract)
|
|
|
if !signTime.IsZero() && !expiredTime.IsZero() {
|
|
|
contractItem.SigningTime = signTime
|
|
@@ -505,16 +518,19 @@ func (this *EtaBusinessController) Edit() {
|
|
|
br.ErrMsg = "参数有误, 商家ID为空"
|
|
|
return
|
|
|
}
|
|
|
- req.Province = strings.TrimSpace(req.Province)
|
|
|
- if req.Province == "" {
|
|
|
- br.Msg = "省份不可为空"
|
|
|
- return
|
|
|
- }
|
|
|
- req.City = strings.TrimSpace(req.City)
|
|
|
- if req.City == "" {
|
|
|
- br.Msg = "城市不可为空"
|
|
|
- return
|
|
|
+ if req.Nation == "" {
|
|
|
+ req.Province = strings.TrimSpace(req.Province)
|
|
|
+ if req.Province == "" {
|
|
|
+ br.Msg = "省份不可为空"
|
|
|
+ return
|
|
|
+ }
|
|
|
+ req.City = strings.TrimSpace(req.City)
|
|
|
+ if req.City == "" {
|
|
|
+ br.Msg = "城市不可为空"
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
req.Leader = strings.TrimSpace(req.Leader)
|
|
|
if req.Leader == "" {
|
|
|
br.Msg = "决策人不可为空"
|
|
@@ -566,6 +582,7 @@ func (this *EtaBusinessController) Edit() {
|
|
|
item.CapitalScale = req.CapitalScale
|
|
|
item.ResearchTeamSize = req.ResearchTeamSize
|
|
|
item.UserMax = req.UserMax
|
|
|
+ item.Nation = req.Nation
|
|
|
item.ModifyTime = time.Now().Local()
|
|
|
cols := []string{
|
|
|
"Province", "City", "Address", "Leader", "IndustryId", "IndustryName", "CapitalScale", "ResearchTeamSize", "UserMax", "ModifyTime",
|
|
@@ -1039,6 +1056,7 @@ func (this *EtaBusinessController) Detail() {
|
|
|
resp.ExpiredTime = utils.TimeTransferString(utils.FormatDate, item.ExpiredTime)
|
|
|
resp.CreateTime = item.CreateTime.Format(utils.FormatDateTime)
|
|
|
resp.ModifyTime = item.ModifyTime.Format(utils.FormatDateTime)
|
|
|
+ resp.Nation = item.Nation
|
|
|
|
|
|
br.Data = resp
|
|
|
br.Ret = 200
|