mirror of
https://shylinux.com/x/operation
synced 2025-07-01 13:14:43 +08:00
add some
This commit is contained in:
parent
1ed82cf4d0
commit
af83ed031e
@ -2,7 +2,11 @@ Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.title, can.onimport.textView(can, value, "status")]},
|
||||
{view: html.STATUS, list: [can.onimport.beginTime(can, value), can.onimport.unitView(can, value, "plan_title")]},
|
||||
{view: html.STATUS, list: [
|
||||
// can.onimport.beginTime(can, value),
|
||||
(value.process_time||value.begin_time).split(" ")[0],
|
||||
can.onimport.unitView(can, value, "plan_title"),
|
||||
]},
|
||||
{view: html.OUTPUT, list: [value.content]}, can.onimport.titleAction(can, value),
|
||||
] })
|
||||
},
|
||||
|
@ -121,7 +121,7 @@ func (s Table) PushIssueButton(m *ice.Message, value ice.Maps, user_uid string,
|
||||
button = append(button, s.Discuss, s.Payfor)
|
||||
}
|
||||
if isCreator {
|
||||
button = append(button, s.Approve, s.Reject, s.Cancel, s.Remove)
|
||||
button = append(button, s.Approve, s.Reject)
|
||||
}
|
||||
if user_uid == value[model.USER_UID] {
|
||||
button = append(button, s.Modify, s.Remove)
|
||||
@ -138,22 +138,22 @@ func (s Table) PushIssueButton(m *ice.Message, value ice.Maps, user_uid string,
|
||||
button = append(button, s.Submit)
|
||||
}
|
||||
case IssueSubmit:
|
||||
if isLeader {
|
||||
button = append(button, s.Discuss, s.Payfor)
|
||||
}
|
||||
if isWorker {
|
||||
button = append(button, s.Preview)
|
||||
}
|
||||
if isLeader {
|
||||
button = append(button, s.Discuss, s.Payfor)
|
||||
}
|
||||
if isCreator {
|
||||
button = append(button, s.Finish, s.Reback, s.Cancel)
|
||||
}
|
||||
case IssueFinish:
|
||||
if isLeader {
|
||||
button = append(button, s.Discuss, s.Payfor)
|
||||
}
|
||||
if isWorker {
|
||||
button = append(button, s.Preview)
|
||||
}
|
||||
if isLeader {
|
||||
button = append(button, s.Discuss, s.Payfor)
|
||||
}
|
||||
if isWorker {
|
||||
button = append(button, arg...)
|
||||
}
|
||||
@ -312,7 +312,8 @@ func (s Table) DealList(m *ice.Message, arg ...string) {
|
||||
}
|
||||
|
||||
func (s Table) finishCheck(m *ice.Message, target ice.Any, name string, arg ...string) bool {
|
||||
count := m.Cmd(target, s.Select, m.CommandKey()+"_uid = ? AND status != ?", m.Option(model.UID), IssueFinish).Length()
|
||||
count := m.Cmd(target, s.Select, m.CommandKey()+"_uid = ? AND status != ? AND status != ? AND status != ?",
|
||||
m.Option(model.UID), IssueRejected, IssueFinish, IssueCancel).Length()
|
||||
if m.WarnNotValid(count > 0, kit.Format("还有 %v 个未完成的%s", count, name)) {
|
||||
return true
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ type deal struct {
|
||||
order string `data:"7"`
|
||||
fields string `data:"from_user_uid,to_user_uid,price,title,content"`
|
||||
create string `name:"create issue_uid* from_user_uid* to_user_uid* price* title* content" role:"leader"`
|
||||
modify string `name:"modify price* title* content" role:"leader"`
|
||||
modify string `name:"modify title* content" role:"leader"`
|
||||
}
|
||||
|
||||
func (s deal) Create(m *ice.Message, arg ...string) {
|
||||
|
@ -2,7 +2,11 @@ Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.title, can.onimport.textView(can, value, "status")]},
|
||||
{view: html.STATUS, list: [can.onimport.beginTime(can, value), can.onimport.unitView(can, value, "plan_title")]},
|
||||
{view: html.STATUS, list: [
|
||||
// can.onimport.beginTime(can, value),
|
||||
(value.process_time||value.begin_time).split(" ")[0],
|
||||
can.onimport.unitView(can, value, "plan_title"),
|
||||
]},
|
||||
// value.price > 0 && {view: html.OUTPUT, list: [can.onimport.unitView(can, value, "price", "元")]},
|
||||
{view: html.OUTPUT, list: [value.content]}, can.onimport.titleAction(can, value),
|
||||
] })
|
||||
|
@ -28,8 +28,12 @@ func (s Issue) Remove(m *ice.Message, arg ...string) {
|
||||
s.ValueRemove(m, arg...)
|
||||
s.planCount(m).DashboardUpdate(m)
|
||||
}
|
||||
func (s Issue) Reject(m *ice.Message, arg ...string) {
|
||||
s.changeStatus(m, IssueCreate, IssueRejected)
|
||||
s.planCount(m).DashboardUpdate(m)
|
||||
}
|
||||
func (s Issue) Cancel(m *ice.Message, arg ...string) {
|
||||
s.ChangeStatus(m, int(IssueCreate), int(IssueCancel))
|
||||
s.ChangeStatus(m, int(IssueSubmit), int(IssueCancel))
|
||||
s.planCount(m).DashboardUpdate(m)
|
||||
}
|
||||
func (s Issue) List(m *ice.Message, arg ...string) {
|
||||
|
@ -2,15 +2,16 @@ Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.title,
|
||||
value.issue_type != "feature" && can.onimport.textView(can, value, "issue_type"),
|
||||
value.level != "level-3" && can.onimport.textView(can, value, "level"),
|
||||
// value.issue_type != "feature" && can.onimport.textView(can, value, "issue_type"),
|
||||
// value.level != "level-3" && can.onimport.textView(can, value, "level"),
|
||||
can.onimport.textView(can, value, "status"),
|
||||
]},
|
||||
{view: html.STATUS, list: [
|
||||
(value.process_time||value.begin_time).split(" ")[0]+" ~ "+(value.finish_time||value.end_time).split(" ")[0],
|
||||
(value.process_time||value.begin_time).split(" ")[0],
|
||||
// +" ~ "+(value.finish_time||value.end_time).split(" ")[0],
|
||||
can.onimport.unitView(can, value, "plan_title"),
|
||||
can.onimport.unitView(can, value, "design_count", "个"),
|
||||
can.onimport.unitView(can, value, "task_count", "个"),
|
||||
can.onimport.unitView(can, value, "plan_title"),
|
||||
]},
|
||||
// value.price > 0 && {view: html.OUTPUT, list: [can.onimport.unitView(can, value, "price", "元")]},
|
||||
{view: html.OUTPUT, list: [value.content]}, can.onimport.titleAction(can, value),
|
||||
|
@ -25,7 +25,7 @@ func (s meet) Create(m *ice.Message, arg ...string) {
|
||||
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) {
|
||||
s.ValueList(m, arg).Display("")
|
||||
s.ValueList(m, arg).PushAction(s.Preview).Display("")
|
||||
if s.IsLeader(m) {
|
||||
m.RenameAppend(model.TO_USER_UID, model.USER_UID)
|
||||
} else {
|
||||
|
@ -2,9 +2,11 @@ Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.title, can.onimport.textView(can, value, "status")]},
|
||||
{view: html.STATUS, list: [can.onimport.beginTime(can, value),
|
||||
can.onimport.unitView(can, value, "case_count", "个"),
|
||||
{view: html.STATUS, list: [
|
||||
// can.onimport.beginTime(can, value),
|
||||
(value.process_time||value.begin_time).split(" ")[0],
|
||||
can.onimport.unitView(can, value, "plan_title"),
|
||||
can.onimport.unitView(can, value, "case_count", "个"),
|
||||
]},
|
||||
{view: html.OUTPUT, list: [value.content]}, can.onimport.titleAction(can, value),
|
||||
] })
|
||||
|
Loading…
x
Reference in New Issue
Block a user