| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //判断是否有采购经理权限(安瑞) |
| | | bool isCgjl = Security_Log("Cg_POOrderBill_PurchasManager", 1, true, user); |
| | | if (!isCgjl) |
| | | |
| | | string sErr = ""; |
| | | if (oSystemParameter.ShowBill(ref sErr)) |
| | | { |
| | | sWhere += $" and HEmpID in (select HEmpID from Gy_Czygl where Czymc='{user}' and HEmpID >0 )"; |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "乔一") |
| | | { |
| | | |
| | | } |
| | | else |
| | | { |
| | | //判断是否有采购经理权限(安瑞) |
| | | bool isCgjl = Security_Log("Cg_POOrderBill_PurchasManager", 1, true, user); |
| | | if (!isCgjl) |
| | | { |
| | | sWhere += $" and HEmpID in (select HEmpID from Gy_Czygl where Czymc='{user}' and HEmpID >0 )"; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | sWhere = sWhere.Replace("'", "''"); |
| | |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region 采购订单 根据用户获取用户关联供应商过滤条件 |
| | | [Route("Cg_POOrderBill/getSupIDListByUser")] |
| | | [HttpGet] |
| | | public object getSupIDListByUser(string CurUserID, string CurUserName) |
| | | { |
| | | string sWhere = ""; |
| | | string ModRightNameCheck = "Gy_UserLookAllSup"; |
| | | DBUtility.ClsPub.CurUserName = CurUserName; |
| | | try |
| | | { |
| | | //权限判断:是否可以查看所有供应商 |
| | | if (DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName)) |
| | | { |
| | | sWhere = ""; |
| | | } |
| | | else |
| | | { |
| | | sWhere = " and HSupID in (select HSupID from Gy_UserSupplierRelation Where HUserID = '" + CurUserID + "')"; |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = sWhere; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sWhere = " and 1=0 "; |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = sWhere; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | |
| | | } |