lining 6 年 前
コミット
4a5f084e22
1 ファイル変更19 行追加14 行削除
  1. 19 14
      src/dashoo.cn/backend/api/controllers/workflow/workflow.go

+ 19 - 14
src/dashoo.cn/backend/api/controllers/workflow/workflow.go

@@ -151,24 +151,29 @@ func (this *WorkflowController) GetWorkflowNodeBySrcId() {
 		historicTasks = append(historicTasks, historicTask)
 	}
 
-	if model.IsPay == "2" {
-		var cert suppliercert.OilSupplierCert
-		has := svc.GetEntity(&cert, "Id=" + srcid)
-		if has {
-			var historicTask workflow.ActiHistoricTask
-			historicTask.StartTime = 0
-			historicTask.EndTime = 0
-			historicTask.TaskName = "入库"
-			historicTask.Assignee = "--"
-			if cert.Status == "7" {
-				historicTask.Remarks = "待入库"
-			} else {
-				historicTask.Remarks = "已入库"
+	var cert suppliercert.OilSupplierCert
+	has = svc.GetEntity(&cert, "Id=" + srcid)
+
+	if has  {
+		if model.IsPay == "2" || cert.Status == "7" || cert.Status == "8" {
+			if has {
+				var historicTask workflow.ActiHistoricTask
+				historicTask.StartTime = 0
+				historicTask.EndTime = 0
+				historicTask.TaskName = "入库"
+				historicTask.Assignee = "--"
+				if cert.Status == "7" {
+					historicTask.Remarks = "待入库"
+				} else {
+					historicTask.Remarks = "已入库"
+				}
+				historicTasks = append(historicTasks, historicTask)
 			}
-			historicTasks = append(historicTasks, historicTask)
 		}
 	}
 
+
+
 	this.Data["json"] = &historicTasks
 	this.ServeJSON()
 }