Przeglądaj źródła

前后:企管法规处看所有部门;服务合同新增专业处室

dubch 4 lat temu
rodzic
commit
4470f385e3

+ 4 - 0
src/dashoo.cn/backend/api/business/auditsetting/oilauditsettingService.go

@@ -67,6 +67,10 @@ func  (s *OilAuditSettingService) GetApproverIdsByStepCodeAndUnitId(stepCode, un
 	uids := strings.Replace(tempstr, "uid_", "", -1)
 	uids = strings.Trim(uids, ",")
 	if uids != "" {
+		if unitId == "100000656" {
+			//HSE监督评价中心 是 二级单位下的小部门,不是专业处室,所以特殊处理
+			unitId = "100000681"
+		}
 		whereUsers := "Id in (" + uids + ")" + " and UnitId=" + unitId
 		usvc.GetEntities(&userlist, whereUsers)
 	}

+ 4 - 1
src/dashoo.cn/backend/api/controllers/casbin/role.go

@@ -2,6 +2,7 @@ package casbin
 
 import (
 	"dashoo.cn/backend/api/business/auditsetting"
+	"dashoo.cn/business2/parameter"
 	"encoding/json"
 	"strconv"
 	"strings"
@@ -132,7 +133,9 @@ func (this *RoleController) OrgAllList() {
 	svcPerm := permission.GetPermissionService(utils.DBE)
 	isauth := svcPerm.IsAuthorized(this.User.Id, "oil_supplier.marketAccess.AllRecord")
 	if svcPerm.IsAdmin(this.User.Id) || isauth {
-		ids = svc.GetAllChildById("100000000")
+		paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
+		id := paramSvc.GetBaseparameterMessage("", "paramset", "HeadquartersID") // 总公司Id
+		ids = svc.GetAllChildById(id)
 	} else {
 		unitId := svc.GetMyUnitDepartmentId(this.User.DepartmentId)
 		ids = svc.GetAllChildById(unitId)

+ 5 - 1
src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go

@@ -1312,6 +1312,7 @@ func (this *OilSupplierController) GetDictListByStatus() {
 	status := this.GetString("status")
 	majorAduit := this.GetString("majorAduit")
 	addId := this.GetString("addId")
+	isTecContract := this.GetString("isTecContract")
 	dictList := make(map[string]interface{})
 	dictSvc := items.GetItemsService(utils.DBE)
 	userSvc := baseUser.GetBaseUserService(utils.DBE)
@@ -1402,7 +1403,10 @@ func (this *OilSupplierController) GetDictListByStatus() {
 	//where = "Category='Unit' and ParentId in (100000001, 100000128)"
 	//00097005 直属机构 00265300 公司机关 00097004 机关附属机构
 	//where = "Category='Unit' and OuterPhone in (00097005,00265300,00097004)"
-	where = "Category='Unit' and ParentId in (100000009, 100000004)"
+	where = "(Category='Unit' and ParentId in (100000009, 100000004))"
+	if isTecContract == "1" {
+		where += " or Id = 100000656"
+	}
 	orgsvc.GetEntities(&allunitorglist, where)
 	dictList["Allunitorglist"] = allunitorglist
 

+ 6 - 0
src/dashoo.cn/frontend_web/src/components/oilcontract/submitPopup.vue

@@ -204,6 +204,11 @@ export default {
       type: null,
       default: 0
     },
+    //1是服务类合同
+    isTecContract: {
+      type: null,
+      default: 0
+    },
     formData: {
       type: Object,
       default: function () {
@@ -685,6 +690,7 @@ export default {
     getDictOptions () {
       let params = {
         status: this.formData.Status,
+        isTecContract: this.isTecContract,
         majorAduit: this.formData.ThirdAudit
       }
       api.getDictListByStatus(params, this.$axios).then(res => {

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-service/_opera/evaluate.vue

@@ -219,7 +219,7 @@
       </el-tabs>
     </el-card>
 
-    <submit-popup ref="submitpopup" :eveId="parseInt(formData.Id)" :selectDeptBoolean="false" :formData="formData"
+    <submit-popup ref="submitpopup" :eveId="parseInt(formData.Id)" :isTecContract="1" :selectDeptBoolean="false" :formData="formData"
                   @refreshPage="refreshPage"></submit-popup>
 
 

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

@@ -119,7 +119,7 @@
       </el-pagination>
     </el-card>
     <!-- :selectDeptBoolean="false"-->
-    <submit-popup ref="submitpopup" :selectDeptBoolean="false" :eveId="eveIdList" :formData="formData" @tableLoading="changeTableLoading"
+    <submit-popup ref="submitpopup" :selectDeptBoolean="false" :eveId="eveIdList" :isTecContract="1" :formData="formData" @tableLoading="changeTableLoading"
                   @refreshPage="initDatas"></submit-popup>
 
     <el-dialog title="高级查询" :close-on-click-modal="false" :visible.sync="dialogVisible" width="720px">