This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-10-04 12:23:33 +08:00
parent b94ea119f9
commit aa6ca8100b
8 changed files with 12 additions and 22 deletions

View File

@ -13,7 +13,7 @@ type Portal struct {
guanlixitong.Portal guanlixitong.Portal
product Product product Product
order Order order Order
placeCreate string `name:"placeCreate city_name* company_name* store_name* store_type*:select" role:"void"` placeCreate string `name:"placeCreate city_name* company_name* store_name* store_type:select" role:"void"`
} }
func (s Portal) AfterPlaceAuth(m *ice.Message, arg ...string) { func (s Portal) AfterPlaceAuth(m *ice.Message, arg ...string) {

View File

@ -2,7 +2,6 @@ package guanlixitong
import ( import (
"shylinux.com/x/ice" "shylinux.com/x/ice"
kit "shylinux.com/x/toolkits"
"shylinux.com/x/enterprise/src/guanlixitong/model" "shylinux.com/x/enterprise/src/guanlixitong/model"
) )
@ -23,24 +22,22 @@ func (s company) FindOrCreateByName(m *ice.Message, arg ...string) {
} }
} }
func (s company) Modify(m *ice.Message, arg ...string) { func (s company) Modify(m *ice.Message, arg ...string) {
s.Update(m, kit.Dict(m.OptionSimple(model.INFO)), m.OptionSimple(model.UID)...) s.Update(m, m.OptionSimple(model.INFO), m.OptionSimple(model.UID)...)
} }
func (s company) List(m *ice.Message, arg ...string) { func (s company) List(m *ice.Message, arg ...string) {
if len(arg) == 0 { if len(arg) == 0 {
s.CityList(m) s.CityList(m)
} else if len(arg) == 1 { } else if msg := s.CityList(m.Spawn(), arg[0]); len(arg) == 1 {
msg := s.CityList(m.Spawn(), arg[0])
s.Select(m, model.CITY_UID, msg.Append(model.UID)) s.Select(m, model.CITY_UID, msg.Append(model.UID))
} else if len(arg) == 2 { } else if len(arg) == 2 {
msg := s.CityList(m.Spawn(), arg[0])
s.Select(m, model.CITY_UID, msg.Append(model.UID), model.NAME, arg[1]) s.Select(m, model.CITY_UID, msg.Append(model.UID), model.NAME, arg[1])
if m.Append(model.AUTH_UID) == "" && m.IsTech() { if m.Append(model.AUTH_UID) == "" {
m.EchoInfoButton("请申请公司认证", s.AuthCreate) m.EchoInfoButton("请申请公司认证", s.AuthCreate)
} }
} }
} }
func (s company) AuthCreate(m *ice.Message, arg ...string) { func (s company) AuthCreate(m *ice.Message, arg ...string) {
msg := m.Cmd("web.team.gonganxitong.city", s.Select, model.UID, m.Option(model.CITY_UID)) msg := s.CityCmd(m, s.Select, model.UID, m.Option(model.CITY_UID))
s.Table.AuthCreate(m, 4, msg.Append(model.AUTH_UID), m.OptionSimple(model.UID)...) s.Table.AuthCreate(m, 4, msg.Append(model.AUTH_UID), m.OptionSimple(model.UID)...)
} }

View File

@ -4,7 +4,7 @@ import "shylinux.com/x/community/src/gonganxitong"
type Portal struct { type Portal struct {
gonganxitong.Portal gonganxitong.Portal
placeCreate string `name:"placeCreate city_name* company_name* group_name* group_type*:select" role:"void"` placeCreate string `name:"placeCreate city_name* company_name* group_name* group_type:select" role:"void"`
} }
func init() { gonganxitong.PortalCmd(NewPortal(userGroup{}, group{})) } func init() { gonganxitong.PortalCmd(NewPortal(userGroup{}, group{})) }

View File

@ -1,8 +1,6 @@
{ {
"portal": "管理系统", "portal": "管理系统", "member": "团队成员",
"target": "目标计划", "target": "目标计划",
"member": "团队成员",
"company": "公司信息",
"icons": { "icons": {
"target": "https://img.icons8.com/officel/80/goal--v1.png" "target": "https://img.icons8.com/officel/80/goal--v1.png"
}, },
@ -10,8 +8,7 @@
"My Group": "我的团队", "My Group": "我的团队",
"user_group_role": "成员角色", "user_group_role": "成员角色",
"group_name": "团队名称", "group_name": "团队名称",
"group_type": "团队类型", "group_type": "团队类型"
"company_name": "公司名称"
}, },
"value": { "value": {
"user_group_role": { "user_group_role": {

View File

@ -5,17 +5,15 @@ import "shylinux.com/x/mysql-story/src/db"
const ( const (
UID = "uid" UID = "uid"
NAME = "name" NAME = "name"
INFO = "info"
TYPE = "type" TYPE = "type"
TITLE = "title" TITLE = "title"
CONTENT = "content" CONTENT = "content"
USER_UID = "user_uid" USER_UID = "user_uid"
USER_CHANNEL_ROLE = "user_channel_role" USER_CHANNEL_ROLE = "user_channel_role"
CHANNEL_UID = "channel_uid" CHANNEL_UID = "channel_uid"
CHANNEL_NAME = "channel_name"
CHANNEL_TYPE = "channel_type" CHANNEL_TYPE = "channel_type"
PROMOTION_UID = "promotion_uid" PROMOTION_UID = "promotion_uid"
COMPANY_UID = "company_uid"
CITY_UID = "city_uid"
) )
type UserChannel struct { type UserChannel struct {

View File

@ -7,7 +7,7 @@ import (
type Portal struct { type Portal struct {
guanlixitong.Portal guanlixitong.Portal
placeCreate string `name:"placeCreate city_name* company_name* channel_name* channel_type*:select" role:"void"` placeCreate string `name:"placeCreate city_name* company_name* channel_name* channel_type:select" role:"void"`
} }
func init() { gonganxitong.PortalCmd(Portal{Portal: guanlixitong.NewPortal(userChannel{}, channel{})}) } func init() { gonganxitong.PortalCmd(Portal{Portal: guanlixitong.NewPortal(userChannel{}, channel{})}) }

View File

@ -5,17 +5,15 @@ import "shylinux.com/x/mysql-story/src/db"
const ( const (
UID = "uid" UID = "uid"
NAME = "name" NAME = "name"
INFO = "info"
TYPE = "type" TYPE = "type"
TITLE = "title" TITLE = "title"
CONTENT = "content" CONTENT = "content"
USER_UID = "user_uid" USER_UID = "user_uid"
USER_CAPITAL_ROLE = "user_capital_role" USER_CAPITAL_ROLE = "user_capital_role"
CAPITAL_UID = "capital_uid" CAPITAL_UID = "capital_uid"
CAPITAL_NAME = "capital_name"
CAPITAL_TYPE = "capital_type" CAPITAL_TYPE = "capital_type"
INVESTMENT_UID = "investment_uid" INVESTMENT_UID = "investment_uid"
COMPANY_UID = "company_uid"
CITY_UID = "city_uid"
) )
type UserCapital struct { type UserCapital struct {

View File

@ -7,7 +7,7 @@ import (
type Portal struct { type Portal struct {
guanlixitong.Portal guanlixitong.Portal
placeCreate string `name:"placeCreate city_name* company_name* capital_name* capital_type*:select" role:"void"` placeCreate string `name:"placeCreate city_name* company_name* capital_name* capital_type:select" role:"void"`
} }
func init() { gonganxitong.PortalCmd(Portal{Portal: guanlixitong.NewPortal(userCapital{}, capital{})}) } func init() { gonganxitong.PortalCmd(Portal{Portal: guanlixitong.NewPortal(userCapital{}, capital{})}) }