|
@@ -1229,30 +1229,31 @@ func GetCompanyPermissionButton(roleTypeCode, status, itemSellerIds, itemGroupId
|
|
|
|
|
|
if authority == 2 && hasGroupId && groupId == sysUserGroupId {
|
|
if authority == 2 && hasGroupId && groupId == sysUserGroupId {
|
|
button.BtnView = true
|
|
button.BtnView = true
|
|
|
|
+ button.BtnRemarkViewHistory = true
|
|
if productStatus == utils.COMPANY_STATUS_FORMAL {
|
|
if productStatus == utils.COMPANY_STATUS_FORMAL {
|
|
button.BtnModifySeller = true
|
|
button.BtnModifySeller = true
|
|
|
|
|
|
|
|
|
|
- button.BtnRemarkViewHistory = true
|
|
+
|
|
} else if productStatus == utils.COMPANY_STATUS_TRY_OUT {
|
|
} else if productStatus == utils.COMPANY_STATUS_TRY_OUT {
|
|
button.BtnModifySeller = true
|
|
button.BtnModifySeller = true
|
|
|
|
|
|
- button.BtnRemarkViewHistory = true
|
|
+
|
|
|
|
|
|
} else if productStatus == utils.COMPANY_STATUS_FREEZE {
|
|
} else if productStatus == utils.COMPANY_STATUS_FREEZE {
|
|
button.BtnModifySeller = true
|
|
button.BtnModifySeller = true
|
|
|
|
|
|
- button.BtnRemarkViewHistory = true
|
|
+
|
|
} else if productStatus == utils.COMPANY_STATUS_LOSE {
|
|
} else if productStatus == utils.COMPANY_STATUS_LOSE {
|
|
if sellerId == sysUserId || groupId == sysUserGroupId || utils.InArrayByStr(shareSellerIdArr, strconv.Itoa(sysUserId)) || shareSellerId == sysUserId {
|
|
if sellerId == sysUserId || groupId == sysUserGroupId || utils.InArrayByStr(shareSellerIdArr, strconv.Itoa(sysUserId)) || shareSellerId == sysUserId {
|
|
button.BtnApplyReceive = true
|
|
button.BtnApplyReceive = true
|
|
} else {
|
|
} else {
|
|
button.BtnReceive = true
|
|
button.BtnReceive = true
|
|
}
|
|
}
|
|
- button.BtnRemarkViewHistory = true
|
|
+
|
|
} else {
|
|
} else {
|
|
|
|
|
|
- button.BtnRemarkViewHistory = true
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2422,6 +2423,7 @@ func FilterReadAndContractAuth(chartPermissions, contractPermissions, condition
|
|
|
|
|
|
|
|
|
|
func GetShareCompanyPermissionButton(roleTypeCode, statuses string, productId int, item *company.CompanyItem, sysUser *system.Admin) (button *company.ButtonPermission) {
|
|
func GetShareCompanyPermissionButton(roleTypeCode, statuses string, productId int, item *company.CompanyItem, sysUser *system.Admin) (button *company.ButtonPermission) {
|
|
|
|
+ statuses = strings.Replace(statuses, "(共享)", "", -1)
|
|
statusMap := make(map[int]string)
|
|
statusMap := make(map[int]string)
|
|
statusMap[productId] = statuses
|
|
statusMap[productId] = statuses
|
|
if strings.Contains(statuses, "/") {
|
|
if strings.Contains(statuses, "/") {
|
|
@@ -2506,6 +2508,9 @@ func GetShareCompanyPermissionButton(roleTypeCode, statuses string, productId in
|
|
|
|
|
|
button.BtnRemarkView = companyButton.BtnRemarkView
|
|
button.BtnRemarkView = companyButton.BtnRemarkView
|
|
button.BtnRemarkViewHistory = companyButton.BtnRemarkViewHistory
|
|
button.BtnRemarkViewHistory = companyButton.BtnRemarkViewHistory
|
|
|
|
+ if productId == 2 {
|
|
|
|
+ button.BtnRemarkView = false
|
|
|
|
+ }
|
|
|
|
|
|
if utils.InArrayByStr([]string{utils.ROLE_TYPE_CODE_RAI_ADMIN, utils.ROLE_TYPE_CODE_RAI_SELLER, utils.ROLE_TYPE_CODE_RAI_GROUP}, roleTypeCode) {
|
|
if utils.InArrayByStr([]string{utils.ROLE_TYPE_CODE_RAI_ADMIN, utils.ROLE_TYPE_CODE_RAI_SELLER, utils.ROLE_TYPE_CODE_RAI_GROUP}, roleTypeCode) {
|
|
button.BtnServiceRecord = false
|
|
button.BtnServiceRecord = false
|