Răsfoiți Sursa

前后:待办类型筛选;合同评价删除工作流

dubch 4 ani în urmă
părinte
comite
761552e3bb

+ 1 - 0
src/dashoo.cn/backend/api/business/oilsupplier/supplier/oilsupplierService.go

@@ -124,6 +124,7 @@ func (s *OilSupplierService) GetMyPagingEntitiesWithOrderBytbl3(supplierTableNam
 	//获取总记录数
 	sqlCount := `select count(DISTINCT b.Id) from ` + supplierTableName + ` a `
 	sqlCount += ` left join ` + supplierCertTableName + " b on b.SupplierId = a.Id"
+	sqlCount += ` left join OilSupplierCertSub c on c.SupplierCertId = b.Id`
 	sqlCount += ` where ` + where
 
 	var sql string

+ 24 - 0
src/dashoo.cn/backend/api/controllers/oilcontract/contractReview.go

@@ -1,6 +1,7 @@
 package oilcontract
 
 import (
+	"dashoo.cn/backend/api/business/auditsetting"
 	"dashoo.cn/backend/api/business/oilcontract/contract"
 	"dashoo.cn/backend/api/business/oilcontract/contractEvaluationItems"
 	"dashoo.cn/backend/api/business/oilsupplier/supplier"
@@ -598,10 +599,33 @@ func (this *OilContractReviewController) DeleteEntity() {
 		this.ServeJSON()
 		return
 	}
+	var setting auditsetting.Base_OilAuditSetting
+	orgSvc := organize.GetOrganizeService(utils.DBE)
+	whereAudit := "AuditStepCode='PROF_REGULATION'"
+	orgSvc.GetEntity(&setting, whereAudit)
+	res := orgSvc.UserInRoleById(this.User.Id, strconv.Itoa(setting.RoleId))
+	if model.Status == "8" && !res{
+		errinfo.Message = "无权删除!"
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
 
 	opdesc := "删除-" + Id
 	err := svc.DeleteOperationAndWriteLogBytbl(OilContractReviewName, BaseOperationLogName, Id, &model, &entityempty, utils.ToStr(this.User.Id), this.User.Username, opdesc, this.User.AccCode, "钻井日报")
 	if err == nil {
+		activitiService := workflow.GetActivitiService(utils.DBE)
+		var deleteProcessVM workflow.DeleteProcessVM
+		if model.WorkflowId != "" && model.WorkflowId != "0" {
+			deleteProcessVM.ProcessInstanceId = model.WorkflowId
+			if model.Status == "8" {
+				deleteProcessVM.DeleteReason = "企管法规处删除"
+			} else {
+				deleteProcessVM.DeleteReason = "未审批通过,被申请人删除"
+			}
+			activitiService.DeleteComplete(deleteProcessVM)
+		}
 		errinfo.Message = "删除成功"
 		errinfo.Code = 0
 		this.Data["json"] = &errinfo

+ 23 - 3
src/dashoo.cn/backend/api/controllers/oilsupplier/todolist.go

@@ -35,12 +35,32 @@ func (this *TodoListController) GetMyTaskEntityList() {
 
 	page := this.GetPageInfoForm()
 
-	// stype := this.GetString("Type") // 1 准入 2 增项 3 年审 4 信息变更 5 注册 7 待入库 8 待开发票 9 目录审批
+	stype := this.GetString("Type") // 1 准入 2 增项 3 年审 4 信息变更 5 注册 7 待入库 8 待开发票 9 目录审批
 	supplierTypeCode := this.GetString("SupplierTypeCode")
 	supplierName := this.GetString("SupplierName")
 	wfNames := ""
-	wfNames = workflow.OIL_ENUSER_SUPPLIER_APPLY  + "," + workflow.OIL_ENUSER_APPEND_APPLY + "," + workflow.OIL_INFO_CHANGE + "," + workflow.OIL_AUDIT_APPLY + "," + workflow.OIL_SUPPLIER_VERIFY+ "," + workflow.OIL_DAILY_CONTRACT_EVALUATION+ "," + workflow.OIL_ANNUAL_CONTRACT_EVALUATION+ "," + workflow.OIL_Catalog+ "," + workflow.OIL_REGISTER_APPLY
-
+	//wfNames = workflow.OIL_ENUSER_SUPPLIER_APPLY  + "," + workflow.OIL_ENUSER_APPEND_APPLY + "," + workflow.OIL_INFO_CHANGE + "," + workflow.OIL_AUDIT_APPLY + "," + workflow.OIL_SUPPLIER_VERIFY+ "," + workflow.OIL_DAILY_CONTRACT_EVALUATION+ "," + workflow.OIL_ANNUAL_CONTRACT_EVALUATION+ "," + workflow.OIL_Catalog+ "," + workflow.OIL_REGISTER_APPLY
+	if stype == "1" {
+		wfNames = workflow.OIL_ENUSER_SUPPLIER_APPLY
+	} else if stype == "2" {
+		wfNames = workflow.OIL_ENUSER_APPEND_APPLY
+	} else if stype == "3" {
+		wfNames = workflow.OIL_AUDIT_APPLY
+	} else if stype == "4" {
+		wfNames = workflow.OIL_INFO_CHANGE
+	} else if stype == "5" {
+		wfNames = workflow.OIL_REGISTER_APPLY
+	} else if stype == "7" {
+		// wfNames = workflow.OIL_SUPPLIER_INSTORE
+	} else if stype == "8" {
+		wfNames = workflow.OIL_SUPPLIER_VERIFY
+	} else if stype == "9" {
+		wfNames = workflow.OIL_Catalog
+	} else if stype == "10" {
+		wfNames = workflow.OIL_DAILY_CONTRACT_EVALUATION
+	} else if stype == "11" {
+		wfNames = workflow.OIL_ANNUAL_CONTRACT_EVALUATION
+	}
 	var todoliststemp []todolist.TodoList
 
 	var pagingResult workflow.ActiMyPagingResultVM

+ 1 - 0
src/dashoo.cn/frontend_web/src/pages/index.vue

@@ -19,6 +19,7 @@
             <el-option label="注册审核" value="5"></el-option>
             <el-option label="待入库" value="7"></el-option>
             <el-option label="收入业务" value="9"></el-option>
+            <el-option label="合同评审" value="10"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="类别">

+ 2 - 1
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-basis/index.vue

@@ -343,7 +343,8 @@ export default {
         CreateBy: '',
         ModifiedOn: '',
         ModifiedUserId: '',
-        ModifiedBy: ''
+        ModifiedBy: '',
+        Status: ''
       },
       tableColumns: [
 

+ 2 - 2
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-goods/index.vue

@@ -341,8 +341,8 @@ export default {
         CreateBy: '',
         ModifiedOn: '',
         ModifiedUserId: '',
-        ModifiedBy: ''
-
+        ModifiedBy: '',
+        Status: ''
       },
       tableColumns: [
 

+ 2 - 1
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-service/index.vue

@@ -340,7 +340,8 @@ export default {
         CreateBy: '',
         ModifiedOn: '',
         ModifiedUserId: '',
-        ModifiedBy: ''
+        ModifiedBy: '',
+        Status: ''
 
       },
       tableColumns: [