|
@@ -369,7 +369,7 @@ func (this *CompanyController) SearchList() {
|
|
|
|
|
|
btnItem := new(company.ButtonPermission)
|
|
|
if item.CompanyId != 1 {
|
|
|
- *btnItem = services.GetCompanyPermissionButton(roleTypeCode, itemStatus, item.SellerIds, item.GroupIds, item.GroupId, sysUser.GroupId, item.SellerId, sysUser.AdminId, sysUser.Authority, item.ProductId, item.ShareSellerId)
|
|
|
+ *btnItem = services.GetCompanyPermissionButton(roleTypeCode, itemStatus, item.SellerIds, item.GroupIds, item.GroupId, sysUser.GroupId, item.SellerId, sysUser.AdminId, sysUser.Authority, item.ProductId, -1, item.ShareSellerIds)
|
|
|
//根据销售"领取客户"的权限对部分按钮做限制
|
|
|
btnItem = services.GetCompanyPermissionButtonByReceiveEnabled(btnItem, receiveEnabled)
|
|
|
}
|
|
@@ -1336,7 +1336,7 @@ func (this *CompanyController) List() {
|
|
|
//按钮显示控制
|
|
|
btnItem := new(company.ButtonPermission)
|
|
|
if item.CompanyId != 1 {
|
|
|
- *btnItem = services.GetCompanyPermissionButton(roleTypeCode, itemStatus, item.GroupIds, item.GroupIds, item.GroupId, sysUser.GroupId, item.SellerId, sysUser.AdminId, sysUser.Authority, item.ProductId, item.ShareSellerId)
|
|
|
+ *btnItem = services.GetCompanyPermissionButton(roleTypeCode, itemStatus, item.GroupIds, item.GroupIds, item.GroupId, sysUser.GroupId, item.SellerId, sysUser.AdminId, sysUser.Authority, item.ProductId, -1, item.ShareSellerIds)
|
|
|
//根据销售"领取客户"的权限对部分按钮做限制
|
|
|
btnItem = services.GetCompanyPermissionButtonByReceiveEnabled(btnItem, receiveEnabled)
|
|
|
}
|
|
@@ -1615,7 +1615,7 @@ func (this *CompanyController) List() {
|
|
|
//viewTotal:=GetviewTotal(v.CompanyId)
|
|
|
|
|
|
//活跃(客户状态)
|
|
|
- if v.IsShare != 1 {
|
|
|
+ if v.IsShare != 1 {
|
|
|
if v.BtnItem.BtnModifySeller == true {
|
|
|
v.BtnItem.BtnModifySeller = false
|
|
|
}
|
|
@@ -1773,11 +1773,20 @@ func (this *CompanyController) List() {
|
|
|
CompanyStatusButton: v.CompanyStatusButton,
|
|
|
ShareSeller: v.ShareSeller,
|
|
|
ShareSellerId: v.ShareSellerId,
|
|
|
- }
|
|
|
- if v.ShareSellerId != 0 {
|
|
|
- shareSeller := adminMap[v.ShareSellerId]
|
|
|
- if shareSeller != nil {
|
|
|
- companyList.ShareSeller = shareSeller.RealName + "(" + shareSeller.GroupName + ")"
|
|
|
+ ShareSellerIds: v.ShareSellerIds,
|
|
|
+ }
|
|
|
+ if v.ShareSellerIds != "" {
|
|
|
+ shareSellerIds := strings.Split(v.ShareSellerIds, ",")
|
|
|
+ for _, idStr := range shareSellerIds {
|
|
|
+ shareSellerId, e := strconv.Atoi(idStr)
|
|
|
+ if e != nil {
|
|
|
+ err = e
|
|
|
+ return
|
|
|
+ }
|
|
|
+ shareSeller := adminMap[shareSellerId]
|
|
|
+ if shareSeller != nil {
|
|
|
+ companyList.ShareSeller += shareSeller.RealName + "(" + shareSeller.GroupName + ")"
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
companyLists = append(companyLists, companyList)
|
|
@@ -3368,7 +3377,7 @@ func (this *CompanyController) Detail() {
|
|
|
resp.IsButtonShow = 1
|
|
|
}
|
|
|
}
|
|
|
- btnItem := services.GetCompanyPermissionButton(roleTypeCode, item.Status, strconv.Itoa(item.SellerId), strconv.Itoa(item.GroupId), item.GroupId, sysUser.GroupId, item.SellerId, sysUser.AdminId, sysUser.Authority, item.ProductId, shareSellerId)
|
|
|
+ btnItem := services.GetCompanyPermissionButton(roleTypeCode, item.Status, strconv.Itoa(item.SellerId), strconv.Itoa(item.GroupId), item.GroupId, sysUser.GroupId, item.SellerId, sysUser.AdminId, sysUser.Authority, item.ProductId, shareSellerId, "")
|
|
|
//if itemLen > 1 {
|
|
|
// btnDetailItem.BtnEdit = false
|
|
|
// btnDetailItem.BtnDelete = false
|
|
@@ -3738,7 +3747,7 @@ func (this *CompanyController) DetailByCreditCode() {
|
|
|
}
|
|
|
}
|
|
|
btnItem := services.GetCompanyPermissionButton(roleTypeCode, item.Status, strconv.Itoa(item.SellerId), strconv.Itoa(item.GroupId),
|
|
|
- item.GroupId, sysUser.GroupId, item.SellerId, sysUser.AdminId, sysUser.Authority, item.ProductId, item.ShareSellerId)
|
|
|
+ item.GroupId, sysUser.GroupId, item.SellerId, sysUser.AdminId, sysUser.Authority, item.ProductId, item.ShareSellerId, "")
|
|
|
//if itemLen > 1 {
|
|
|
// btnDetailItem.BtnEdit = false
|
|
|
// btnDetailItem.BtnDelete = false
|