Ver código fonte

Merge branch 'aj_overseas_custorm' into debug

hongze 1 ano atrás
pai
commit
9f959d02c7

+ 1 - 0
controllers/company.go

@@ -2866,6 +2866,7 @@ func (this *CompanyController) Add() {
 	item.Remark = req.Reasons
 	item.Nation = req.Nation
 	item.OverseasStatus = "试用"
+	item.ResetBtn = 1
 	companyId, err := company.AddCompany(item)
 	if err != nil {
 		br.Msg = "新增失败"

+ 1 - 0
controllers/english_report/english_company.go

@@ -300,6 +300,7 @@ func (this *EnglishCompanyController) Save() {
 		}
 		item.OverseasLabel = 1
 		item.OverseasStatus = "试用"
+		item.ResetBtn = 1
 		if e = item.Create(); e != nil {
 			br.Msg = "保存失败"
 			br.ErrMsg = "新增英文客户失败, Err:" + e.Error()

+ 1 - 1
controllers/overseas_custom/custom.go

@@ -294,7 +294,7 @@ func (this *OverseasCustomController) CustomStatusSet() {
 	if item.OverseasStatus == "正式" && item.ResetBtn == 2 { //重置,获取当前客户的状态
 		overseasStatus = item.CompanyStatus
 		resetBtn = 1
-	} else if item.OverseasStatus == "试用" && item.ResetBtn == 1 { //转正式,获取当前客户的状态
+	} else if item.OverseasStatus == "试用" && (item.ResetBtn == 1 || item.ResetBtn == 0) { //转正式,获取当前客户的状态
 		overseasStatus = "正式"
 		resetBtn = 2
 	}

+ 1 - 0
models/company/company.go

@@ -44,6 +44,7 @@ type Company struct {
 	Nation          string    `description:"所属国家"`
 	IsHide          int       `description:"是否隐藏:0:不隐藏,1:隐藏"`
 	OverseasStatus  string    `description:"海外客户状态:'正式','试用','关闭'"`
+	ResetBtn        int       `description:"转正式和重置按钮:同步过来默认为0:显示转正式为1:显示重置为2"`
 }
 
 // 新增客户