mirror of
https://shylinux.com/x/operation
synced 2025-07-02 05:31:20 +08:00
add some
This commit is contained in:
parent
6780763856
commit
dc653f5151
@ -39,8 +39,6 @@ func (s Table) RewriteAppend(m *ice.Message, arg ...string) *ice.Message {
|
|||||||
value = ClusterStatus(kit.Int(value)).String()
|
value = ClusterStatus(kit.Int(value)).String()
|
||||||
case model.TEMPLATE_STATUS:
|
case model.TEMPLATE_STATUS:
|
||||||
value = TemplateStatus(kit.Int(value)).String()
|
value = TemplateStatus(kit.Int(value)).String()
|
||||||
case model.PRICE:
|
|
||||||
value = kit.Format("%.2f", kit.Float(value)/100)
|
|
||||||
}
|
}
|
||||||
return value
|
return value
|
||||||
})
|
})
|
||||||
|
@ -41,6 +41,11 @@ func (s care) List(m *ice.Message, arg ...string) {
|
|||||||
deal += kit.Int(value[model.PRICE])
|
deal += kit.Int(value[model.PRICE])
|
||||||
})
|
})
|
||||||
m.Push("已支付", kit.Format(deal/100))
|
m.Push("已支付", kit.Format(deal/100))
|
||||||
|
check := func(target ice.Any, score int) int {
|
||||||
|
return m.Cmd(target, s.Select, model.USER_UID, value[model.USER_UID], model.SCORE, score).Length()
|
||||||
|
}
|
||||||
|
m.Push("一星", check(Issue{}, 1)+check(Design{}, 1))
|
||||||
|
m.Push("五星", check(Issue{}, 5)+check(Design{}, 5))
|
||||||
m.Push(model.UID, value[model.USER_UID])
|
m.Push(model.UID, value[model.USER_UID])
|
||||||
})
|
})
|
||||||
if m.Action().Display(""); m.FieldsIsDetail() {
|
if m.Action().Display(""); m.FieldsIsDetail() {
|
||||||
@ -51,15 +56,13 @@ func (s care) List(m *ice.Message, arg ...string) {
|
|||||||
}
|
}
|
||||||
func (s care) IssueList(m *ice.Message, arg ...string) {
|
func (s care) IssueList(m *ice.Message, arg ...string) {
|
||||||
s.Orders(m, model.STATUS, model.DESIGN_COUNT, model.TASK_COUNT, s.Desc(model.CREATED_AT)).Limit(m, 300)
|
s.Orders(m, model.STATUS, model.DESIGN_COUNT, model.TASK_COUNT, s.Desc(model.CREATED_AT)).Limit(m, 300)
|
||||||
m.Cmdy(Issue{}, s.Select, model.USER_UID, m.Option(model.UID))
|
s.OtherList(m, Issue{}, model.USER_UID, m.Option(model.UID))
|
||||||
m.RenameAppend(model.STORY_UID, model.PLACE_UID).Options("_other_cmd", ice.GetTypeKey(Issue{})).Display("issue.js")
|
m.RenameAppend(model.STORY_UID, model.PLACE_UID)
|
||||||
s.SelectJoinUser(m)
|
|
||||||
}
|
}
|
||||||
func (s care) DesignList(m *ice.Message, arg ...string) {
|
func (s care) DesignList(m *ice.Message, arg ...string) {
|
||||||
s.Orders(m, model.STATUS, s.Desc(model.CREATED_AT)).Limit(m, 300)
|
s.Orders(m, model.STATUS, s.Desc(model.CREATED_AT)).Limit(m, 300)
|
||||||
m.Cmdy(Design{}, s.Select, model.USER_UID, m.Option(model.UID))
|
s.OtherList(m, Design{}, model.USER_UID, m.Option(model.UID))
|
||||||
m.RenameAppend(model.STORY_UID, model.PLACE_UID).Options("_other_cmd", ice.GetTypeKey(Design{})).Display("design.js")
|
m.RenameAppend(model.STORY_UID, model.PLACE_UID)
|
||||||
s.SelectJoinUser(m)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { ice.TeamCtxCmd(care{}) }
|
func init() { ice.TeamCtxCmd(care{}) }
|
||||||
|
@ -4,6 +4,7 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
{view: html.TITLE, list: [
|
{view: html.TITLE, list: [
|
||||||
value.user_name,
|
value.user_name,
|
||||||
can.onimport.unitView(can, value, "已支付", "元"),
|
can.onimport.unitView(can, value, "已支付", "元"),
|
||||||
|
can.onimport.unitView(can, value, "一星", "个"),
|
||||||
can.onimport.titleAction(can, value),
|
can.onimport.titleAction(can, value),
|
||||||
]},
|
]},
|
||||||
{view: html.STATUS, list: [
|
{view: html.STATUS, list: [
|
||||||
|
@ -38,6 +38,7 @@ type Table struct {
|
|||||||
dealList string `name:"dealList" role:"worker"`
|
dealList string `name:"dealList" role:"worker"`
|
||||||
preview string `name:"preview" role:"worker"`
|
preview string `name:"preview" role:"worker"`
|
||||||
program string `name:"program" role:"worker"`
|
program string `name:"program" role:"worker"`
|
||||||
|
setScore string `name:"setScore score" role:"leader" help:"评分"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s Table) Inputs(m *ice.Message, arg ...string) {
|
func (s Table) Inputs(m *ice.Message, arg ...string) {
|
||||||
@ -164,12 +165,18 @@ func (s Table) PushIssueButton(m *ice.Message, value ice.Maps, user_uid string,
|
|||||||
if isWorker {
|
if isWorker {
|
||||||
button = append(button, s.Preview)
|
button = append(button, s.Preview)
|
||||||
}
|
}
|
||||||
|
if isCreator && value[model.SCORE] == "0" {
|
||||||
|
button = append(button, s.SetScore)
|
||||||
|
}
|
||||||
if isWorker {
|
if isWorker {
|
||||||
button = append(button, arg...)
|
button = append(button, arg...)
|
||||||
}
|
}
|
||||||
kit.If(m.FieldsIsDetail(), func() { s.DoneMessage(m) })
|
kit.If(m.FieldsIsDetail(), func() { s.DoneMessage(m) })
|
||||||
case IssueCancel:
|
case IssueCancel:
|
||||||
if isLeader {
|
if isCreator && value[model.SCORE] == "0" {
|
||||||
|
button = append(button, s.SetScore)
|
||||||
|
}
|
||||||
|
if isCreator {
|
||||||
button = append(button, s.Trash)
|
button = append(button, s.Trash)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -224,6 +231,9 @@ func (s Table) StatusCount(m *ice.Message, arg ...string) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
func (s Table) SetScore(m *ice.Message, arg ...string) {
|
||||||
|
s.Update(m, arg, m.OptionSimple(model.UID, model.STORY_UID)...)
|
||||||
|
}
|
||||||
func (s Table) Reject(m *ice.Message, arg ...string) {
|
func (s Table) Reject(m *ice.Message, arg ...string) {
|
||||||
s.changeStatus(m, IssueCreate, IssueRejected)
|
s.changeStatus(m, IssueCreate, IssueRejected)
|
||||||
}
|
}
|
||||||
@ -284,17 +294,19 @@ func (s Table) OtherCreate(m *ice.Message, target ice.Any, arg ...string) {
|
|||||||
m.Cmdy(target, s.Create, arg)
|
m.Cmdy(target, s.Create, arg)
|
||||||
kit.If(!m.IsErr(), func() { m.ProcessField(target, []string{m.Option(model.STORY_UID), m.Result()}) })
|
kit.If(!m.IsErr(), func() { m.ProcessField(target, []string{m.Option(model.STORY_UID), m.Result()}) })
|
||||||
}
|
}
|
||||||
func (s Table) OtherList(m *ice.Message, target ice.Any, arg ...string) *ice.Message {
|
func (s Table) OtherList(m *ice.Message, target ice.Any, arg ...string) {
|
||||||
m.Cmdy(target, s.Select, m.OptionSimple(model.STORY_UID), m.CommandKey()+"_uid", m.Option(model.UID))
|
m.Cmdy(target, s.Select, arg).Display(kit.Select("", strings.Split(ice.GetTypeKey(target), "."), -1) + ".js")
|
||||||
if m.ActionKeyIsIn(s.MeetList, s.DealList) {
|
|
||||||
if s.IsLeader(m) {
|
|
||||||
m.RenameAppend(model.TO_USER_UID, model.USER_UID)
|
|
||||||
} else {
|
|
||||||
m.RenameAppend(model.FROM_USER_UID, model.USER_UID)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
m.Option("_other_cmd", ice.GetTypeKey(target))
|
m.Option("_other_cmd", ice.GetTypeKey(target))
|
||||||
s.SelectJoinUser(m)
|
}
|
||||||
|
func (s Table) commonOtherList(m *ice.Message, target ice.Any, arg ...string) *ice.Message {
|
||||||
|
if m.Option(model.ISSUE_UID) == "" {
|
||||||
|
s.OtherList(m, target, kit.Simple(m.CommandKey()+"_uid", m.Option(model.UID))...)
|
||||||
|
} else if ice.GetTypeKey(target) == ice.GetTypeKey(Issue{}) {
|
||||||
|
s.OtherList(m, target, model.UID, m.Option(model.ISSUE_UID))
|
||||||
|
} else {
|
||||||
|
s.OtherList(m, target, model.ISSUE_UID, m.Option(model.ISSUE_UID))
|
||||||
|
}
|
||||||
|
m.RenameAppend(model.TO_USER_UID, model.USER_UID)
|
||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
func (s Table) OtherListCmd(m *ice.Message, arg ...ice.Any) *ice.Message {
|
func (s Table) OtherListCmd(m *ice.Message, arg ...ice.Any) *ice.Message {
|
||||||
@ -316,29 +328,27 @@ func (s Table) otherListButton(m *ice.Message, arg ...string) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
func (s Table) IssueList(m *ice.Message, arg ...string) {
|
func (s Table) IssueList(m *ice.Message, arg ...string) {
|
||||||
s.OtherList(m, Issue{}).Display("issue.js")
|
s.commonOtherList(m, Issue{})
|
||||||
s.otherListButton(m)
|
s.otherListButton(m)
|
||||||
}
|
}
|
||||||
func (s Table) DesignList(m *ice.Message, arg ...string) {
|
func (s Table) DesignList(m *ice.Message, arg ...string) {
|
||||||
s.OtherList(m, Design{}).Display("design.js")
|
s.commonOtherList(m, Design{})
|
||||||
s.otherListButton(m)
|
s.otherListButton(m)
|
||||||
}
|
}
|
||||||
func (s Table) TaskList(m *ice.Message, arg ...string) {
|
func (s Table) TaskList(m *ice.Message, arg ...string) {
|
||||||
s.OtherList(m, Task{}).Display("task.js")
|
s.commonOtherList(m, Task{}).RenameAppend(model.STATUS, model.TASK_STATUS)
|
||||||
m.RenameAppend(model.STATUS, model.TASK_STATUS)
|
|
||||||
m.PushAction(s.Program)
|
m.PushAction(s.Program)
|
||||||
}
|
}
|
||||||
func (s Table) CaseList(m *ice.Message, arg ...string) {
|
func (s Table) CaseList(m *ice.Message, arg ...string) {
|
||||||
s.OtherList(m, Case{}).Display("case.js")
|
s.commonOtherList(m, Case{}).RenameAppend(model.STATUS, model.CASE_STATUS)
|
||||||
m.RenameAppend(model.STATUS, model.CASE_STATUS)
|
|
||||||
m.PushAction(s.Preview)
|
m.PushAction(s.Preview)
|
||||||
}
|
}
|
||||||
func (s Table) MeetList(m *ice.Message, arg ...string) {
|
func (s Table) MeetList(m *ice.Message, arg ...string) {
|
||||||
s.OtherList(m, Meet{}).Display("meet.js")
|
s.commonOtherList(m, Meet{})
|
||||||
m.PushAction(s.Preview)
|
m.PushAction(s.Preview)
|
||||||
}
|
}
|
||||||
func (s Table) DealList(m *ice.Message, arg ...string) {
|
func (s Table) DealList(m *ice.Message, arg ...string) {
|
||||||
s.OtherList(m, Deal{}).Display("deal.js")
|
s.commonOtherList(m, Deal{})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s Table) finishCheck(m *ice.Message, target ice.Any, name string, arg ...string) bool {
|
func (s Table) finishCheck(m *ice.Message, target ice.Any, name string, arg ...string) bool {
|
||||||
@ -359,6 +369,7 @@ func (s Table) ChangeStatus(m *ice.Message, from, to int, arg ...string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
s.Table.ChangeStatus(m, m.Option(model.STORY_UID), m.Option(model.UID), from, to, arg...)
|
s.Table.ChangeStatus(m, m.Option(model.STORY_UID), m.Option(model.UID), from, to, arg...)
|
||||||
|
s.RecordEventWithName(m, "")
|
||||||
s.DashboardUpdate(m)
|
s.DashboardUpdate(m)
|
||||||
}
|
}
|
||||||
func (s Table) addCount(m *ice.Message, target ice.Any) Table {
|
func (s Table) addCount(m *ice.Message, target ice.Any) Table {
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
type Deal struct {
|
type Deal struct {
|
||||||
Table
|
Table
|
||||||
order string `data:"11"`
|
order string `data:"11"`
|
||||||
fields string `data:"from_user_uid,to_user_uid,price,title,content"`
|
fields string `data:"from_user_uid,to_user_uid,price,title,content,issue_uid"`
|
||||||
create string `name:"create issue_uid* from_user_uid* to_user_uid* price* title* content" role:"leader"`
|
create string `name:"create issue_uid* from_user_uid* to_user_uid* price* title* content" role:"leader"`
|
||||||
modify string `name:"modify title* content" role:"leader"`
|
modify string `name:"modify title* content" role:"leader"`
|
||||||
}
|
}
|
||||||
@ -36,6 +36,7 @@ func (s Deal) List(m *ice.Message, arg ...string) {
|
|||||||
} else {
|
} else {
|
||||||
m.RenameAppend(model.FROM_USER_UID, model.USER_UID)
|
m.RenameAppend(model.FROM_USER_UID, model.USER_UID)
|
||||||
}
|
}
|
||||||
|
s.OtherListCmd(m, s.IssueList, s.DesignList, s.MeetList)
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { ice.TeamCtxCmd(Deal{}) }
|
func init() { ice.TeamCtxCmd(Deal{}) }
|
||||||
|
@ -10,7 +10,7 @@ import (
|
|||||||
type Design struct {
|
type Design struct {
|
||||||
Table
|
Table
|
||||||
order string `data:"3"`
|
order string `data:"3"`
|
||||||
fields string `data:"updated_at,title,content,status,price,link,begin_time,end_time,process_time,finish_time,issue_uid,plan_uid,story_uid,user_uid"`
|
fields string `data:"updated_at,title,content,status,price,score,link,begin_time,end_time,process_time,finish_time,issue_uid,plan_uid,story_uid,user_uid"`
|
||||||
create string `name:"create issue_uid*select title* content* price*=1000 begin_time:select@date end_time:select@date" role:"worker"`
|
create string `name:"create issue_uid*select title* content* price*=1000 begin_time:select@date end_time:select@date" role:"worker"`
|
||||||
modify string `name:"modify title* content* price* link begin_time*:select@date end_time*:select@date" role:"worker"`
|
modify string `name:"modify title* content* price* link begin_time*:select@date end_time*:select@date" role:"worker"`
|
||||||
}
|
}
|
||||||
@ -24,6 +24,10 @@ func (s Design) Remove(m *ice.Message, arg ...string) {
|
|||||||
s.ValueRemove(m, arg...)
|
s.ValueRemove(m, arg...)
|
||||||
s.issueCount(m)
|
s.issueCount(m)
|
||||||
}
|
}
|
||||||
|
func (s Design) Reject(m *ice.Message, arg ...string) {
|
||||||
|
s.changeStatus(m, IssueCreate, IssueRejected)
|
||||||
|
s.issueCount(m)
|
||||||
|
}
|
||||||
func (s Design) Cancel(m *ice.Message, arg ...string) {
|
func (s Design) Cancel(m *ice.Message, arg ...string) {
|
||||||
s.ChangeStatus(m, int(IssueCreate), int(IssueCancel))
|
s.ChangeStatus(m, int(IssueCreate), int(IssueCancel))
|
||||||
s.issueCount(m)
|
s.issueCount(m)
|
||||||
@ -35,5 +39,7 @@ func (s Design) List(m *ice.Message, arg ...string) {
|
|||||||
s.SelectJoinPlan(m)
|
s.SelectJoinPlan(m)
|
||||||
m.Table(func(value ice.Maps) { s.PushIssueButton(m, value, user_uid) }).Display("")
|
m.Table(func(value ice.Maps) { s.PushIssueButton(m, value, user_uid) }).Display("")
|
||||||
kit.If(len(arg) == 1, func() { m.Sort("plan_status,status,updated_at", ice.STR, ice.STR, ice.STR_R) })
|
kit.If(len(arg) == 1, func() { m.Sort("plan_status,status,updated_at", ice.STR, ice.STR, ice.STR_R) })
|
||||||
|
s.OtherListCmd(m, s.IssueList, s.MeetList, s.DealList)
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { ice.TeamCtxCmd(Design{}) }
|
func init() { ice.TeamCtxCmd(Design{}) }
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
Volcanos(chat.ONIMPORT, {
|
Volcanos(chat.ONIMPORT, {
|
||||||
_init: function(can, msg) {
|
_init: function(can, msg) {
|
||||||
can.onimport.myViewTabs(can, "status", msg, function(value) { return [
|
can.onimport.myViewTabs(can, "status", msg, function(value) { return [
|
||||||
{view: html.TITLE, list: [value.title, can.onimport.textView(can, value, "status")]},
|
{view: html.TITLE, list: [
|
||||||
|
value.title,
|
||||||
|
value.score != "3" && can.onimport.unitView(can, value, "score", "星"),
|
||||||
|
can.onimport.textView(can, value, "status"),
|
||||||
|
]},
|
||||||
{view: html.STATUS, list: [
|
{view: html.STATUS, list: [
|
||||||
can.onimport.timeView(can, value),
|
can.onimport.timeView(can, value),
|
||||||
can.onimport.unitView(can, value, "plan_title"),
|
can.onimport.unitView(can, value, "plan_title"),
|
||||||
|
@ -10,7 +10,7 @@ import (
|
|||||||
type Issue struct {
|
type Issue struct {
|
||||||
Table
|
Table
|
||||||
order string `data:"2"`
|
order string `data:"2"`
|
||||||
fields string `data:"updated_at,title,content,issue_type,level,status,price,link,design_count,task_count,begin_time,end_time,process_time,finish_time,plan_uid,story_uid,user_uid"`
|
fields string `data:"updated_at,title,content,issue_type,level,status,price,score,link,design_count,task_count,begin_time,end_time,process_time,finish_time,plan_uid,story_uid,user_uid"`
|
||||||
create string `name:"create plan_uid*:select title* content* issue_type:select level:selelt price=1000 begin_time:select@date end_time:select@date" role:"worker"`
|
create string `name:"create plan_uid*:select title* content* issue_type:select level:selelt price=1000 begin_time:select@date end_time:select@date" role:"worker"`
|
||||||
modify string `name:"modify title* content* price* link begin_time:select@date end_time:select@date" role:"worker"`
|
modify string `name:"modify title* content* price* link begin_time:select@date end_time:select@date" role:"worker"`
|
||||||
designCreate string `name:"designCreate title* content* price=1000 begin_time:select@date end_time:select@date" role:"worker"`
|
designCreate string `name:"designCreate title* content* price=1000 begin_time:select@date end_time:select@date" role:"worker"`
|
||||||
|
@ -4,6 +4,7 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
{view: html.TITLE, list: [value.title,
|
{view: html.TITLE, list: [value.title,
|
||||||
// value.issue_type != "feature" && can.onimport.textView(can, value, "issue_type"),
|
// value.issue_type != "feature" && can.onimport.textView(can, value, "issue_type"),
|
||||||
// value.level != "level-3" && can.onimport.textView(can, value, "level"),
|
// value.level != "level-3" && can.onimport.textView(can, value, "level"),
|
||||||
|
value.score != "3" && can.onimport.unitView(can, value, "score", "星"),
|
||||||
can.onimport.textView(can, value, "status"),
|
can.onimport.textView(can, value, "status"),
|
||||||
]},
|
]},
|
||||||
{view: html.STATUS, list: [
|
{view: html.STATUS, list: [
|
||||||
|
@ -19,22 +19,23 @@ type Meet struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s Meet) Create(m *ice.Message, arg ...string) {
|
func (s Meet) Create(m *ice.Message, arg ...string) {
|
||||||
t := time.Unix(kit.Time(m.Option("date")+" "+m.Option("time")+":00")/int64(time.Second), 0)
|
t := time.Unix(kit.Time(kit.Select(m.Option("date")+" "+m.Option("time")+":00", m.Option(model.BEGIN_TIME)))/int64(time.Second), 0)
|
||||||
company_uid := m.Cmd(story{}, s.Select, model.UID, m.Option(model.STORY_UID)).Append(model.COMPANY_UID)
|
|
||||||
m.Option(model.COMPANY_UID, company_uid)
|
|
||||||
m.OptionDefault(model.BEGIN_TIME, t.Format(ice.MOD_TIME), model.END_TIME, t.Add(30*time.Minute).Format(ice.MOD_TIME))
|
m.OptionDefault(model.BEGIN_TIME, t.Format(ice.MOD_TIME), model.END_TIME, t.Add(30*time.Minute).Format(ice.MOD_TIME))
|
||||||
|
m.Option(model.COMPANY_UID, m.Cmd(story{}, s.Select, model.UID, m.Option(model.STORY_UID)).Append(model.COMPANY_UID))
|
||||||
s.ValueCreate(m, m.OptionSimple("issue_uid,from_user_uid,to_user_uid,meet_type,title,content,link,begin_time,end_time,plan_uid,company_uid")...)
|
s.ValueCreate(m, m.OptionSimple("issue_uid,from_user_uid,to_user_uid,meet_type,title,content,link,begin_time,end_time,plan_uid,company_uid")...)
|
||||||
s.SendMessage(s.GetCommandUID(m), m.Option(model.FROM_USER_UID), m.Option(model.TO_USER_UID))
|
s.SendMessage(s.GetCommandUID(m), m.Option(model.FROM_USER_UID), m.Option(model.TO_USER_UID))
|
||||||
s.SendMessage(s.GetCommandUID(m), m.Option(model.TO_USER_UID), m.Option(model.FROM_USER_UID))
|
s.SendMessage(s.GetCommandUID(m), m.Option(model.TO_USER_UID), m.Option(model.FROM_USER_UID))
|
||||||
}
|
}
|
||||||
func (s Meet) List(m *ice.Message, arg ...string) {
|
func (s Meet) List(m *ice.Message, arg ...string) {
|
||||||
s.ValueList(m, arg).PushAction(s.Preview, s.Remove).Display("")
|
if s.ValueList(m, arg).Display(""); s.IsLeader(m) {
|
||||||
if s.IsLeader(m) {
|
|
||||||
m.RenameAppend(model.TO_USER_UID, model.USER_UID)
|
m.RenameAppend(model.TO_USER_UID, model.USER_UID)
|
||||||
|
m.PushAction(s.Preview, s.Remove)
|
||||||
} else {
|
} else {
|
||||||
m.RenameAppend(model.FROM_USER_UID, model.USER_UID)
|
m.RenameAppend(model.FROM_USER_UID, model.USER_UID)
|
||||||
|
m.PushAction(s.Preview)
|
||||||
}
|
}
|
||||||
kit.If(!s.IsLeader(m) && m.Length() == 0, func() { m.SetResult().Echo("请等待管理员创建会议") })
|
kit.If(!s.IsLeader(m) && m.Length() == 0, func() { m.SetResult().Echo("请等待管理员创建会议") })
|
||||||
|
s.OtherListCmd(m, s.IssueList, s.DesignList, s.DealList)
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { ice.TeamCtxCmd(Meet{}) }
|
func init() { ice.TeamCtxCmd(Meet{}) }
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
Volcanos(chat.ONIMPORT, {
|
Volcanos(chat.ONIMPORT, {
|
||||||
_init: function(can, msg) {
|
_init: function(can, msg) {
|
||||||
|
if (msg.IsDetail()) { var value = msg.TableDetail()
|
||||||
|
msg.Option("_share_title", value.title+" "+value.meet_type)
|
||||||
|
msg.Option("_share_content", "时间: "+can.base.trimPrefix(value.begin_time, can.base.Time(null, "%y-")).slice(0, -3)+"\n"+value.content)
|
||||||
|
}
|
||||||
can.onimport.myView(can, msg, function(value) { return [
|
can.onimport.myView(can, msg, function(value) { return [
|
||||||
{view: html.TITLE, list: [value.title, value.meet_type, can.onimport.titleAction(can, value)]},
|
{view: html.TITLE, list: [value.title, value.meet_type, can.onimport.titleAction(can, value)]},
|
||||||
{view: html.STATUS, list: [value.uid.slice(0, 6), value.user_name, value.begin_time+" ~ "+value.end_time.split(" ")[1]]},
|
{view: html.STATUS, list: [value.uid.slice(0, 6), value.user_name, value.begin_time+" ~ "+value.end_time.split(" ")[1]]},
|
||||||
|
@ -13,6 +13,7 @@ const (
|
|||||||
STATUS = "status"
|
STATUS = "status"
|
||||||
COUNT = "count"
|
COUNT = "count"
|
||||||
PRICE = "price"
|
PRICE = "price"
|
||||||
|
SCORE = "score"
|
||||||
TITLE = "title"
|
TITLE = "title"
|
||||||
CONTENT = "content"
|
CONTENT = "content"
|
||||||
VERSION = "version"
|
VERSION = "version"
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
{
|
{
|
||||||
"portal": "产品迭代", "member": "项目成员",
|
"portal": "产品迭代", "member": "项目成员",
|
||||||
"plan": "迭代计划", "issue": "产品需求", "design": "界面设计", "task": "开发任务", "case": "测试用例",
|
"plan": "迭代计划", "issue": "产品需求", "design": "界面设计", "task": "开发任务", "case": "测试用例",
|
||||||
"care": "新人帮助", "take": "项目接单", "stat": "项目统计", "date": "会议预约", "meet": "会议记录", "deal": "支付记录",
|
"care": "新人帮助", "take": "项目接单", "stat": "项目统计", "date": "会议预约", "meet": "会议安排", "deal": "支付记录",
|
||||||
"bindPlan": "绑定计划",
|
|
||||||
"discuss": "约会", "payfor": "支付", "program": "编程",
|
|
||||||
"process": "开始", "submit": "提交", "reback": "返工", "finish": "完成",
|
"process": "开始", "submit": "提交", "reback": "返工", "finish": "完成",
|
||||||
"issueCreate": "原型设计", "designCreate": "界面设计", "taskCreate": "开发任务", "caseCreate": "测试用例",
|
"issueCreate": "原型设计", "designCreate": "界面设计", "taskCreate": "开发任务", "caseCreate": "测试用例",
|
||||||
"issueList": "原型设计", "designList": "界面设计", "taskList": "开发任务", "caseList": "测试用例",
|
"issueList": "原型设计", "designList": "界面设计", "taskList": "开发任务", "caseList": "测试用例",
|
||||||
"meetList": "会议记录", "dealList": "支付记录",
|
"discuss": "约会", "payfor": "支付", "program": "编程", "bindPlan": "绑定计划",
|
||||||
|
"meetList": "会议安排", "dealList": "支付记录",
|
||||||
"style": {
|
"style": {
|
||||||
"discuss": "notice",
|
"discuss": "notice",
|
||||||
"payfor": "notice",
|
"payfor": "notice",
|
||||||
@ -17,6 +16,7 @@
|
|||||||
"submit": "notice",
|
"submit": "notice",
|
||||||
"reback": "danger",
|
"reback": "danger",
|
||||||
"finish": "notice",
|
"finish": "notice",
|
||||||
|
"setScore": "notice",
|
||||||
"issueCreate": "notice",
|
"issueCreate": "notice",
|
||||||
"designCreate": "notice",
|
"designCreate": "notice",
|
||||||
"taskCreate": "notice",
|
"taskCreate": "notice",
|
||||||
@ -60,6 +60,7 @@
|
|||||||
"to_user_uid": "收款人",
|
"to_user_uid": "收款人",
|
||||||
"process_time": "开始时间",
|
"process_time": "开始时间",
|
||||||
"finish_time": "完成时间",
|
"finish_time": "完成时间",
|
||||||
|
"score": "评分",
|
||||||
"date": "日期",
|
"date": "日期",
|
||||||
"comment": "备注",
|
"comment": "备注",
|
||||||
"level": "优先级"
|
"level": "优先级"
|
||||||
|
4
src/production/take.css
Normal file
4
src/production/take.css
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
$output>div.tabs>div.item.select.PM待评审 { border-top:var(--box-danger) !important; }
|
||||||
|
$output>div.tabs>div.item.select.PM待提交 { border-top:var(--box-danger) !important; }
|
||||||
|
$output>div.tabs>div.item.select.UI待评审 { border-top:var(--box-danger) !important; }
|
||||||
|
$output>div.tabs>div.item.select.UI待提交 { border-top:var(--box-danger) !important; }
|
@ -19,43 +19,68 @@ func (s take) List(m *ice.Message, arg ...string) {
|
|||||||
if value["auth_status"] != "issued" {
|
if value["auth_status"] != "issued" {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
m.Cmd(Plan{}, s.Select, model.STORY_UID, value[model.UID], model.STATUS, kit.Format(PlanProcess)).Table(func(val ice.Maps) {
|
push := func(val ice.Maps, t string) {
|
||||||
|
m.Push(model.TYPE, t)
|
||||||
|
m.Push(model.UID, val[model.UID])
|
||||||
|
m.Push(model.TITLE, val[model.TITLE])
|
||||||
|
m.Push(model.CONTENT, val[model.CONTENT])
|
||||||
|
m.Push(model.USER_UID, val[model.USER_UID])
|
||||||
|
m.Push(model.STORY_UID, value[model.UID])
|
||||||
|
m.Push(model.STORY_NAME, value[model.NAME])
|
||||||
|
m.Push(model.UPDATED_AT, kit.Select(val[model.CREATED_AT], val[model.UPDATED_AT]))
|
||||||
|
}
|
||||||
|
m.Cmd(Plan{}, s.Select, model.STORY_UID, value[model.UID], model.STATUS, PlanProcess).Table(func(val ice.Maps) {
|
||||||
if kit.Int(val[model.ISSUE_COUNT]) == 0 {
|
if kit.Int(val[model.ISSUE_COUNT]) == 0 {
|
||||||
m.Push("type", "PM")
|
push(val, "PM可接单")
|
||||||
m.Push("uid", val["uid"])
|
|
||||||
m.Push("title", val["title"])
|
|
||||||
m.Push("content", val["content"])
|
|
||||||
m.Push("user_uid", val["user_uid"])
|
|
||||||
m.Push("story_uid", value[model.UID])
|
|
||||||
m.Push("story_name", value[model.NAME])
|
|
||||||
m.Push("created_at", value["created_at"])
|
|
||||||
} else {
|
} else {
|
||||||
m.Cmd(Issue{}, s.Select, model.STORY_UID, value[model.UID], model.PLAN_UID, val[model.UID], model.STATUS, kit.Format(IssueFinish), model.DESIGN_COUNT, "0").Table(func(val ice.Maps) {
|
m.Cmd(Issue{}, s.Select, model.STORY_UID, value[model.UID], model.PLAN_UID, val[model.UID], model.STATUS, IssueFinish, model.DESIGN_COUNT, "0").Table(func(val ice.Maps) {
|
||||||
m.Push("type", "UI")
|
push(val, "UI可接单")
|
||||||
m.Push("uid", val["uid"])
|
|
||||||
m.Push("title", val["title"])
|
|
||||||
m.Push("content", val["content"])
|
|
||||||
m.Push("user_uid", val["user_uid"])
|
|
||||||
m.Push("story_uid", value[model.UID])
|
|
||||||
m.Push("story_name", value[model.NAME])
|
|
||||||
m.Push("created_at", value["created_at"])
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
deadline := m.Time("-120h")
|
||||||
|
check := func(target ice.Any, status IssueStatus, t string) {
|
||||||
|
m.Cmd(target, s.Select, model.STORY_UID, value[model.UID], model.STATUS, status).Table(func(val ice.Maps) {
|
||||||
|
kit.If(kit.Select(val[model.CREATED_AT], val[model.UPDATED_AT]) < deadline, func() { push(val, t) })
|
||||||
})
|
})
|
||||||
m.PushAction(s.Info, s.Main).Display("").SortStrR(model.CREATED_AT)
|
}
|
||||||
|
check(Issue{}, IssueCreate, "PM待评审")
|
||||||
|
check(Issue{}, IssueProcess, "PM待提交")
|
||||||
|
check(Design{}, IssueCreate, "UI待评审")
|
||||||
|
check(Design{}, IssueProcess, "UI待提交")
|
||||||
|
m.Cmd(Task{}, s.Select, model.STORY_UID, value[model.UID]).Table(func(val ice.Maps) {
|
||||||
|
push(val, "RD可编程")
|
||||||
|
})
|
||||||
|
m.Cmd(Case{}, s.Select, model.STORY_UID, value[model.UID]).Table(func(val ice.Maps) {
|
||||||
|
push(val, "QA可测试")
|
||||||
|
})
|
||||||
|
good := func(target ice.Any, t string) {
|
||||||
|
m.Cmd(target, s.Select, model.STORY_UID, value[model.UID], model.STATUS, IssueFinish).Table(func(val ice.Maps) {
|
||||||
|
kit.If(kit.IsIn(val[model.SCORE], "4", "5"), func() { push(val, t) })
|
||||||
|
})
|
||||||
|
}
|
||||||
|
good(Issue{}, "PM优秀项目")
|
||||||
|
good(Design{}, "UI优秀项目")
|
||||||
|
})
|
||||||
|
m.PushAction(s.Info, s.Main).Display("").DisplayCSS("").Sort(kit.Fields(model.TYPE, model.UPDATED_AT), []string{
|
||||||
|
"PM可接单", "UI可接单", "PM待评审", "PM待提交", "UI待评审", "UI待提交", "PM优秀项目", "UI优秀项目", "RD可编程", "QA可测试",
|
||||||
|
}, ice.STR_R)
|
||||||
}
|
}
|
||||||
func (s take) Main(m *ice.Message, arg ...string) {
|
func (s take) Main(m *ice.Message, arg ...string) {
|
||||||
m.ProcessField(Portal{}, []string{m.Option(model.STORY_UID)}, arg...)
|
m.ProcessField(Portal{}, []string{m.Option(model.STORY_UID)}, arg...)
|
||||||
}
|
}
|
||||||
func (s take) Info(m *ice.Message, arg ...string) {
|
func (s take) Info(m *ice.Message, arg ...string) {
|
||||||
switch m.Option(model.TYPE) {
|
switch m.Option(model.TYPE) {
|
||||||
case "PM":
|
case "RD可测试":
|
||||||
|
m.ProcessField(Task{}, []string{m.Option(model.STORY_UID), m.Option(model.UID)}, arg...)
|
||||||
|
case "QA可测试":
|
||||||
|
m.ProcessField(Case{}, []string{m.Option(model.STORY_UID), m.Option(model.UID)}, arg...)
|
||||||
|
case "PM可接单":
|
||||||
m.ProcessField(Plan{}, []string{m.Option(model.STORY_UID), m.Option(model.UID)}, arg...)
|
m.ProcessField(Plan{}, []string{m.Option(model.STORY_UID), m.Option(model.UID)}, arg...)
|
||||||
case "UI":
|
case "PM待评审", "PM待提交", "PM优秀项目", "UI可接单":
|
||||||
m.ProcessField(Issue{}, []string{m.Option(model.STORY_UID), m.Option(model.UID)}, arg...)
|
m.ProcessField(Issue{}, []string{m.Option(model.STORY_UID), m.Option(model.UID)}, arg...)
|
||||||
default:
|
default:
|
||||||
m.ProcessField(Issue{}, []string{m.Option(model.STORY_UID), m.Option(model.UID)}, arg...)
|
m.ProcessField(Design{}, []string{m.Option(model.STORY_UID), m.Option(model.UID)}, arg...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,13 +4,16 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
{view: html.TITLE, list: [value.story_name, value.title, can.onimport.textView(can, value, TYPE, STATUS)]},
|
{view: html.TITLE, list: [value.story_name, value.title, can.onimport.textView(can, value, TYPE, STATUS)]},
|
||||||
{view: html.STATUS, list: [can.onimport.timeView(can, value), value.user_name]},
|
{view: html.STATUS, list: [can.onimport.timeView(can, value), value.user_name]},
|
||||||
{view: html.OUTPUT, list: [value.content]}, can.onimport.titleAction(can, value),
|
{view: html.OUTPUT, list: [value.content]}, can.onimport.titleAction(can, value),
|
||||||
] }, function(event, value) {
|
] }, function(event, value) { var index = "web.team.production.design"
|
||||||
if (value.type == "PM") {
|
switch (value.type) {
|
||||||
// can.onimport.myStory(can, {index: "web.team.production.portal", args: [value.story_uid, "web.team.production.plan", value.uid]})
|
case "PM可接单": index = "web.team.production.plan"; break
|
||||||
can.onimport.myStory(can, {index: "web.team.production.plan", args: [value.story_uid, value.uid]})
|
case "PM待评审":
|
||||||
} else {
|
case "PM待提交":
|
||||||
can.onimport.myStory(can, {index: "web.team.production.issue", args: [value.story_uid, value.uid]})
|
case "PM优秀项目":
|
||||||
}
|
case "UI可接单": index = "web.team.production.issue"; break
|
||||||
|
case "RD可编程": index = "web.team.production.task"; break
|
||||||
|
case "QA可测试": index = "web.team.production.case"; break
|
||||||
|
} can.onimport.myStory(can, {index: index, args: [value.story_uid, value.uid]})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
})
|
})
|
Loading…
x
Reference in New Issue
Block a user