Browse Source

Merge remote-tracking branch 'origin/master'

master
God 2 years ago
parent
commit
38584a8afd
  1. 3
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/busvehicleapply/BusVehicleApplyDetailsVo.java
  2. 2
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/busvehicleapply/BusVehicleApplyQuery.java
  3. 1
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/busvehicleapply/BusVehicleApplyMapper.java
  4. 4
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/busvehicleapply/BusVehicleApplyService.java
  5. 2
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/busvehicleapplydetail/BusVehicleApplyDetailMapper.xml
  6. 12
      anrui-base/anrui-base-ui/src/views/caigouxitong/purchasingsystemAdd.vue
  7. 5
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finselectedreceivablesdetailed/FinSelectedReceivablesDetailed.java
  8. 20
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java
  9. 3
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finselectedreceivablesdetailed/FinSelectedReceivablesDetailedMapper.java
  10. 11
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finselectedreceivablesdetailed/FinSelectedReceivablesDetailedMapper.xml
  11. 8
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finselectedreceivablesdetailed/FinSelectedReceivablesDetailedService.java
  12. 8
      anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flow/FlowableRest.java
  13. 110
      anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskService.java
  14. 20
      anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysuser/SysHaveMessageQuery.java
  15. 16
      anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysuser/SysUserFeign.java
  16. 4
      anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysuser/SysUserFeignFallback.java
  17. 2
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysmenu/SysMenuMapper.java
  18. 4
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysmenu/SysMenuMapper.xml
  19. 4
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysmenu/SysMenuService.java
  20. 8
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserRest.java
  21. 59
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserService.java
  22. 20
      anrui-scm/anrui-scm-ui/src/api/cheliang/dictcommons.js
  23. 2
      anrui-scm/anrui-scm-ui/src/layout/components/Navbar.vue
  24. 17
      anrui-scm/anrui-scm-ui/src/main.js
  25. 6
      anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js
  26. 8
      anrui-scm/anrui-scm-ui/src/utils/auth.js
  27. 18
      anrui-scm/anrui-scm-ui/src/views/supplychain/cheliangpaichan/cheliangpaichan.vue
  28. 29
      anrui-scm/anrui-scm-ui/src/views/supplychain/cheliangpaichan/cheliangpaichanAdd.vue
  29. 18
      anrui-scm/anrui-scm-ui/src/views/supplychain/cheliangpaichan/chexingbyconfiguration.vue
  30. 49
      anrui-scm/anrui-scm-ui/src/views/supplychain/cheliangpaichan/shangzhuangselect/shangzhuangpeizhi.vue
  31. 15
      anrui-scm/anrui-scm-ui/src/views/workFlow/paichanguanliFlow/paichanguanli/cheliangpaichanEdit.vue
  32. 18
      anrui-scm/anrui-scm-ui/src/views/workFlow/paichanguanliFlow/paichanguanli/chexingbyconfiguration.vue
  33. 49
      anrui-scm/anrui-scm-ui/src/views/workFlow/paichanguanliFlow/paichanguanli/shangzhuangselect/shuangzhuangpeizhi.vue
  34. 7
      anrui-system-ui/src/api/User/login.js
  35. 6
      anrui-system-ui/src/store/modules/user.js
  36. 46
      anrui-system-ui/src/views/Home/Home.vue
  37. 38
      anrui-system-ui/src/views/organizationManage/organizationManage.vue

3
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/busvehicleapply/BusVehicleApplyDetailsVo.java

@ -67,4 +67,7 @@ public class BusVehicleApplyDetailsVo implements Vo {
private String carBrandSid; private String carBrandSid;
@ApiModelProperty(value = "品牌名称") @ApiModelProperty(value = "品牌名称")
private String carBrandName; private String carBrandName;
@ApiModelProperty("申请人orgPath")
private String orgPath;
} }

2
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/busvehicleapply/BusVehicleApplyQuery.java

@ -39,4 +39,6 @@ public class BusVehicleApplyQuery implements Query {
private String schedulingTypeKey; private String schedulingTypeKey;
private String applicationCode; private String applicationCode;
@ApiModelProperty("当前组织机构的全路径sid")
private String orgPath;
} }

1
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/busvehicleapply/BusVehicleApplyMapper.java

@ -50,4 +50,5 @@ public interface BusVehicleApplyMapper extends BaseMapper<BusVehicleApply> {
int selectCountBySids(String join); int selectCountBySids(String join);
ActualAndOrgDeptVo getActualAndOrgDept(@Param("sid") String vehicleOrderSid, @Param("modelSid") String modelSid, @Param("configSid") String configSid); ActualAndOrgDeptVo getActualAndOrgDept(@Param("sid") String vehicleOrderSid, @Param("modelSid") String modelSid, @Param("configSid") String configSid);
} }

4
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/busvehicleapply/BusVehicleApplyService.java

@ -161,6 +161,9 @@ public class BusVehicleApplyService extends MybatisBaseService<BusVehicleApplyMa
// String orgSid = sysStaffOrgFeign.getPathSidByUserSid(query.getUserSid()).getData(); // String orgSid = sysStaffOrgFeign.getPathSidByUserSid(query.getUserSid()).getData();
// qw.eq("bva.createOrgSid", orgSid); // qw.eq("bva.createOrgSid", orgSid);
// } // }
if(StringUtils.isNotBlank(query.getOrgPath())){
qw.eq("bva.orgSidPath",query.getOrgPath());
}
} }
qw.orderByDesc("bva.id"); qw.orderByDesc("bva.id");
@ -198,6 +201,7 @@ public class BusVehicleApplyService extends MybatisBaseService<BusVehicleApplyMa
BusVehicleApplyDetailsVo busVehicleApplyDetailsVo = new BusVehicleApplyDetailsVo(); BusVehicleApplyDetailsVo busVehicleApplyDetailsVo = new BusVehicleApplyDetailsVo();
BusVehicleApply busVehicleApply = this.fetchBySid(sid); BusVehicleApply busVehicleApply = this.fetchBySid(sid);
BeanUtil.copyProperties(busVehicleApply, busVehicleApplyDetailsVo); BeanUtil.copyProperties(busVehicleApply, busVehicleApplyDetailsVo);
busVehicleApplyDetailsVo.setOrgPath(busVehicleApply.getOrgSidPath());
List<BusVehicleApplyDetailVo> busVehicleApplyDetailVos = busVehicleApplyDetailService.fetchByApplySid(sid); List<BusVehicleApplyDetailVo> busVehicleApplyDetailVos = busVehicleApplyDetailService.fetchByApplySid(sid);
busVehicleApplyDetailsVo.setBusVehicleApplyDetailList(busVehicleApplyDetailVos); busVehicleApplyDetailsVo.setBusVehicleApplyDetailList(busVehicleApplyDetailVos);
return busVehicleApplyDetailsVo; return busVehicleApplyDetailsVo;

2
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/busvehicleapplydetail/BusVehicleApplyDetailMapper.xml

@ -58,7 +58,7 @@
where bd.vehicleSid = #{modelSid} where bd.vehicleSid = #{modelSid}
and bd.configSid = #{configSid} and length(bo.orderNo)>0 and bd.configSid = #{configSid} and length(bo.orderNo)>0
and length (bo.platformNo) and length (bo.platformNo)
> 0 and bo.platformNo != bo.lockingNum > 0
</select> </select>
<select id="getVehicleApply" resultType="com.yxt.anrui.base.api.busvehicleapply.app.AppVehicleApplyListVo"> <select id="getVehicleApply" resultType="com.yxt.anrui.base.api.busvehicleapply.app.AppVehicleApplyListVo">

12
anrui-base/anrui-base-ui/src/views/caigouxitong/purchasingsystemAdd.vue

@ -42,8 +42,14 @@
<el-col :span="4" class="tleftb"> <el-col :span="4" class="tleftb">
<span>采购系统</span> <span>采购系统</span>
</el-col> </el-col>
<el-col :span="20"> <el-col :span="8">
<el-form-item><el-input v-model="formobj.purchaseSystemName" clearable placeholder="" style="width: 20%" /></el-form-item> <el-form-item><el-input v-model="formobj.purchaseSystemName" clearable placeholder="" class="addinputw" /></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>财务中分公司编码</span>
</el-col>
<el-col :span="8">
<el-form-item><el-input v-model="formobj.orgCode" clearable placeholder="" class="addinputw" /></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
@ -73,6 +79,7 @@ export default {
deptSid: '', deptSid: '',
useOrgName: '', useOrgName: '',
useOrgSid: '', useOrgSid: '',
orgCode: '',
purchaseSystemName: '' purchaseSystemName: ''
}, },
rules: {}, rules: {},
@ -156,6 +163,7 @@ export default {
deptSid: '', deptSid: '',
useOrgName: '', useOrgName: '',
useOrgSid: '', useOrgSid: '',
orgCode: '',
purchaseSystemName: '' purchaseSystemName: ''
} }
this.submitdisabled = false this.submitdisabled = false

5
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finselectedreceivablesdetailed/FinSelectedReceivablesDetailed.java

@ -85,4 +85,9 @@ public class FinSelectedReceivablesDetailed extends BaseEntity {
@ApiModelProperty("应收未收sid") @ApiModelProperty("应收未收sid")
private String receivablesSid; private String receivablesSid;
@ApiModelProperty("全款贷款key:1是全款,2贷款")
private String payTypeKey;
@ApiModelProperty("全款贷款")
private String payType;
} }

20
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java

@ -1334,15 +1334,16 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl
//物料列表 //物料列表
List<ARReceivebill.FRECEIVEBILLENTRY> fEntityList = new ArrayList<>(); List<ARReceivebill.FRECEIVEBILLENTRY> fEntityList = new ArrayList<>();
ARReceivebill.FRECEIVEBILLENTRY freceivebillentry = new ARReceivebill.FRECEIVEBILLENTRY(); ARReceivebill.FRECEIVEBILLENTRY freceivebillentry = new ARReceivebill.FRECEIVEBILLENTRY();
//推送车款 //推送全款车款
List<FinSelectedReceivablesDetailedVo> finSelectedReceivablesDetailedVos1 = finSelectedReceivablesDetailedService.fetchByAuditState1(sid, 1, "车款"); List<FinSelectedReceivablesDetailedVo> finSelectedReceivablesDetailedVos1 = finSelectedReceivablesDetailedService.fetchByAuditState1(sid, 1, "车款","1");
//推送订金 //推送全款订金
List<FinSelectedReceivablesDetailedVo> finSelectedReceivablesDetailedVos2 = finSelectedReceivablesDetailedService.fetchByAuditState1(sid, 1, "订金"); List<FinSelectedReceivablesDetailedVo> finSelectedReceivablesDetailedVos2 = finSelectedReceivablesDetailedService.fetchByAuditState1(sid, 1, "订金","1");
List<FinSelectedReceivablesDetailedVo> voListv = finSelectedReceivablesDetailedService.selectDetailsList(sid, 1, "车款"); List<FinSelectedReceivablesDetailedVo> voListv = finSelectedReceivablesDetailedService.selectDetailsList(sid, 1, "车款");
//查询是否含有车架号 //查询是否含有车架号
List<String> stringsVin = voListv.stream().filter(v -> StringUtils.isNotBlank(v.getVIN())).map(v -> v.getVIN()).collect(Collectors.toList()); List<String> stringsVin = voListv.stream().filter(v -> StringUtils.isNotBlank(v.getVIN())).map(v -> v.getVIN()).collect(Collectors.toList());
stringsVin.removeAll(Collections.singleton(null)); stringsVin.removeAll(Collections.singleton(null));
int carSize = 0; int carSize = 0;
//全款推送车款
if (finSelectedReceivablesDetailedVos1.size() > 0) { if (finSelectedReceivablesDetailedVos1.size() > 0) {
if (!stringsVin.isEmpty()) { if (!stringsVin.isEmpty()) {
//查询根据客户名称和手机号有哪些客户 //查询根据客户名称和手机号有哪些客户
@ -1464,7 +1465,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl
} }
//推送订金 //全款推送订金
if (finSelectedReceivablesDetailedVos2.size() > 0) { if (finSelectedReceivablesDetailedVos2.size() > 0) {
voListv = finSelectedReceivablesDetailedService.selectDetailsList(sid, 1, "订金"); voListv = finSelectedReceivablesDetailedService.selectDetailsList(sid, 1, "订金");
//查询是否含有车架号 //查询是否含有车架号
@ -1581,7 +1582,16 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl
} }
//贷款推送车款
List<FinSelectedReceivablesDetailedVo> finSelectedReceivablesDetailedVos1_1 = finSelectedReceivablesDetailedService.fetchByAuditState1_1(sid, 1, "车款","2");
//贷款推送订金
List<FinSelectedReceivablesDetailedVo> finSelectedReceivablesDetailedVos2_1 = finSelectedReceivablesDetailedService.fetchByAuditState1_1(sid, 1, "订金","2");
if(finSelectedReceivablesDetailedVos1_1.size()>0){
}
if(finSelectedReceivablesDetailedVos2_1.size()>0){
}
//简易订单-订金收取 //简易订单-订金收取
if (finSelectedReceivablesDetailedVos1.isEmpty() && finSelectedReceivablesDetailedVos2.isEmpty()) { if (finSelectedReceivablesDetailedVos1.isEmpty() && finSelectedReceivablesDetailedVos2.isEmpty()) {
//先推送客户 //先推送客户

3
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finselectedreceivablesdetailed/FinSelectedReceivablesDetailedMapper.java

@ -107,7 +107,8 @@ public interface FinSelectedReceivablesDetailedMapper extends BaseMapper<FinSele
List<FinSelectedReceivablesDetailed> getList(@Param("list") List<String> sidsList); List<FinSelectedReceivablesDetailed> getList(@Param("list") List<String> sidsList);
List<FinSelectedReceivablesDetailedVo> fetchByAuditState1(@Param("sid") String sid, @Param("state") int i, @Param("type") String type); List<FinSelectedReceivablesDetailedVo> fetchByAuditState1(@Param("sid") String sid, @Param("state") int i, @Param("type") String type,@Param("payTypeKey")String payTypeKey);
List<FinSelectedReceivablesDetailedVo> fetchByAuditState1_1(@Param("sid") String sid, @Param("state") int i, @Param("type") String type,@Param("payTypeKey")String payTypeKey);
List<SelectCustomerVo> selectCustomerList(@Param("sid") String sid, @Param("state") int i, @Param("type") String type); List<SelectCustomerVo> selectCustomerList(@Param("sid") String sid, @Param("state") int i, @Param("type") String type);

11
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finselectedreceivablesdetailed/FinSelectedReceivablesDetailedMapper.xml

@ -129,10 +129,19 @@
from fin_selected_receivables_detailed from fin_selected_receivables_detailed
where collSid = #{sid} where collSid = #{sid}
and auditState = #{state} and auditState = #{state}
and receivablesName = #{type} and receivablesName = #{type} and payTypeKey = #{payTypeKey}
group by concat(customerName, customerPhone) group by concat(customerName, customerPhone)
</select> </select>
<select id="fetchByAuditState1_1"
resultType="com.yxt.anrui.fin.api.finselectedreceivablesdetailed.FinSelectedReceivablesDetailedVo">
select *, sum(subscriptionMoney) as sumAll
from fin_selected_receivables_detailed
where collSid = #{sid}
and auditState = #{state}
and receivablesName = #{type} and payTypeKey = #{payTypeKey}
</select>
<select id="selectCustomerList" resultType="com.yxt.anrui.fin.api.finselectedreceivablesdetailed.SelectCustomerVo"> <select id="selectCustomerList" resultType="com.yxt.anrui.fin.api.finselectedreceivablesdetailed.SelectCustomerVo">
select customerName, customerPhone,customerSid select customerName, customerPhone,customerSid
from fin_selected_receivables_detailed from fin_selected_receivables_detailed

8
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finselectedreceivablesdetailed/FinSelectedReceivablesDetailedService.java

@ -222,8 +222,12 @@ public class FinSelectedReceivablesDetailedService extends MybatisBaseService<Fi
return baseMapper.getList(sidsList); return baseMapper.getList(sidsList);
} }
public List<FinSelectedReceivablesDetailedVo> fetchByAuditState1(String sid, int i, String type) { public List<FinSelectedReceivablesDetailedVo> fetchByAuditState1(String sid, int i, String type,String payTypeKey) {
return baseMapper.fetchByAuditState1(sid, i, type); return baseMapper.fetchByAuditState1(sid, i, type,payTypeKey);
}
public List<FinSelectedReceivablesDetailedVo> fetchByAuditState1_1(String sid, int i, String type,String payTypeKey) {
return baseMapper.fetchByAuditState1_1(sid, i, type,payTypeKey);
} }
public List<SelectCustomerVo> selectCustomerList(String sid, int i, String type) { public List<SelectCustomerVo> selectCustomerList(String sid, int i, String type) {

8
anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flow/FlowableRest.java

@ -152,8 +152,16 @@ public class FlowableRest implements FlowableFeign {
if (StringUtils.isBlank(dto.getBusinessSid())) { if (StringUtils.isBlank(dto.getBusinessSid())) {
return rb.setMsg("businessSid 不能为空!"); return rb.setMsg("businessSid 不能为空!");
} }
if(dto.getFormVariables()==null) if(dto.getFormVariables()==null)
dto.setFormVariables(new HashMap<String, Object>()); dto.setFormVariables(new HashMap<String, Object>());
Map<String, Object> formVariables = dto.getFormVariables();
if(StringUtils.isNotBlank(dto.getOrgSidPath())){
String orgPath=dto.getOrgSidPath();
formVariables.put("createrOrgPath",orgPath);//发起人的组织结构sid
//dto.setFormVariables(formVariables);
}
dto.getFormVariables().put("businessSid",dto.getBusinessSid()); dto.getFormVariables().put("businessSid",dto.getBusinessSid());
String nextNodeUserSids_ = dto.getNextNodeUserSids(); String nextNodeUserSids_ = dto.getNextNodeUserSids();
if(StringUtils.isBlank(nextNodeUserSids_)){ if(StringUtils.isBlank(nextNodeUserSids_)){

110
anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskService.java

@ -33,6 +33,7 @@ import com.yxt.anrui.portal.api.sysuser.UserQuery;
import com.yxt.anrui.portal.api.sysuserrole.SysUserRoleFeign; import com.yxt.anrui.portal.api.sysuserrole.SysUserRoleFeign;
import com.yxt.common.base.config.component.FileUploadComponent; import com.yxt.common.base.config.component.FileUploadComponent;
import com.yxt.common.base.service.MybatisBaseService; import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.ConstantUtils;
import com.yxt.common.base.utils.DateUtils; import com.yxt.common.base.utils.DateUtils;
import com.yxt.common.base.utils.StringUtils; import com.yxt.common.base.utils.StringUtils;
import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.query.PagerQuery;
@ -548,13 +549,25 @@ public class FlowTaskService extends MybatisBaseService<FlowTaskMapper, FlowTask
if(sysUserVoResultBean.getData()!=null){ if(sysUserVoResultBean.getData()!=null){
flowTask.setStartUserSid(sysUserVoResultBean.getData().getSid()); flowTask.setStartUserSid(sysUserVoResultBean.getData().getSid());
flowTask.setStartUserName(sysUserVoResultBean.getData().getName()); flowTask.setStartUserName(sysUserVoResultBean.getData().getName());
ResultBean<String> pathSidByUserSid = sysStaffOrgFeign.getPathSidByUserSid(sysUserVoResultBean.getData().getSid()); String createOrgPath = ConstantUtils.getString(flowTask.getProcessVariables(),"createrOrgPath","");
String ogrName=""; String ogrName="";
if(pathSidByUserSid.getData()!=null){ if(StringUtils.isNotBlank(createOrgPath)){
ResultBean<SysOrganizationVo> sysOrganizationVoResultBean = sysOrganizationFeign.fetchBySid(pathSidByUserSid.getData()); List<String> stringList = Arrays.asList(createOrgPath.split("/"));
ogrName=sysOrganizationVoResultBean.getData().getName(); ResultBean<SysOrganizationVo> sysOrganizationVoResultBean = sysOrganizationFeign.fetchBySid(stringList.get(stringList.size()-1));
if(sysOrganizationVoResultBean.getData() != null){
if(StringUtils.isNotBlank(sysOrganizationVoResultBean.getData().getPsid())){
ResultBean<SysOrganizationVo> sysOrganizationVoResultBeanP = sysOrganizationFeign.fetchBySid(sysOrganizationVoResultBean.getData().getPsid());
if(sysOrganizationVoResultBeanP.getData() != null){
ogrName=sysOrganizationVoResultBean.getData().getName();
flowTask.setStartDeptName(ogrName+"-"+sysOrganizationVoResultBean.getData().getName());
}
}else{
flowTask.setStartDeptName(sysOrganizationVoResultBean.getData().getName());
}
}
}else{
flowTask.setStartDeptName(sysUserVoResultBean.getData().getOrganizationName());
} }
flowTask.setStartDeptName(ogrName+"-"+sysUserVoResultBean.getData().getOrganizationName());
} }
ResultBean<SysUserVo> sysUserVoResultBean2 = sysUserFeign.fetchBySid(userSid); ResultBean<SysUserVo> sysUserVoResultBean2 = sysUserFeign.fetchBySid(userSid);
flowTask.setAssigneeName(sysUserVoResultBean2.getData().getName()); flowTask.setAssigneeName(sysUserVoResultBean2.getData().getName());
@ -764,13 +777,13 @@ public class FlowTaskService extends MybatisBaseService<FlowTaskMapper, FlowTask
if(sysUserVoResultBean.getData()!=null){ if(sysUserVoResultBean.getData()!=null){
flowTask.setStartUserSid(sysUserVoResultBean.getData().getSid()); flowTask.setStartUserSid(sysUserVoResultBean.getData().getSid());
flowTask.setStartUserName(sysUserVoResultBean.getData().getName()); flowTask.setStartUserName(sysUserVoResultBean.getData().getName());
ResultBean<String> pathSidByUserSid = sysStaffOrgFeign.getPathSidByUserSid(sysUserVoResultBean.getData().getSid()); /*ResultBean<String> pathSidByUserSid = sysStaffOrgFeign.getPathSidByUserSid(sysUserVoResultBean.getData().getSid());
String ogrName=""; String ogrName="";
if(pathSidByUserSid.getData()!=null){ if(pathSidByUserSid.getData()!=null){
ResultBean<SysOrganizationVo> sysOrganizationVoResultBean = sysOrganizationFeign.fetchBySid(pathSidByUserSid.getData()); ResultBean<SysOrganizationVo> sysOrganizationVoResultBean = sysOrganizationFeign.fetchBySid(pathSidByUserSid.getData());
ogrName=sysOrganizationVoResultBean.getData().getName(); ogrName=sysOrganizationVoResultBean.getData().getName();
} }
flowTask.setStartDeptName(ogrName+"-"+sysUserVoResultBean.getData().getOrganizationName()); flowTask.setStartDeptName(ogrName+"-"+sysUserVoResultBean.getData().getOrganizationName());*/
} }
// flowTask.setStartDeptName(sysUserVoResultBean.getData().getOrganizationName()); // flowTask.setStartDeptName(sysUserVoResultBean.getData().getOrganizationName());
HistoricTaskInstance historicTaskInstance = historyService.createHistoricTaskInstanceQuery().includeProcessVariables().taskId(flowTask.getTaskId()).singleResult(); HistoricTaskInstance historicTaskInstance = historyService.createHistoricTaskInstanceQuery().includeProcessVariables().taskId(flowTask.getTaskId()).singleResult();
@ -786,12 +799,30 @@ public class FlowTaskService extends MybatisBaseService<FlowTaskMapper, FlowTask
flowTask.setEndTime(new Date(end_time_t_l)); flowTask.setEndTime(new Date(end_time_t_l));
} }
flowTask.setProcessVariables(historicTaskInstance.getProcessVariables()); flowTask.setProcessVariables(historicTaskInstance.getProcessVariables());
String createOrgPath = ConstantUtils.getString(flowTask.getProcessVariables(),"createrOrgPath","");
// 设置手机端参数 String ogrName="";
// Map<String, Map<String, Object>> map = getAppOrPcVariables(flowTask); if(StringUtils.isNotBlank(createOrgPath)){
// flowTask.setAppVariables(map.get("appVariables")); List<String> stringList = Arrays.asList(createOrgPath.split("/"));
// flowTask.setPcVariables(map.get("pcVariables")); ResultBean<SysOrganizationVo> sysOrganizationVoResultBean = sysOrganizationFeign.fetchBySid(stringList.get(stringList.size()-1));
if(sysOrganizationVoResultBean.getData() != null){
if(StringUtils.isNotBlank(sysOrganizationVoResultBean.getData().getPsid())){
ResultBean<SysOrganizationVo> sysOrganizationVoResultBeanP = sysOrganizationFeign.fetchBySid(sysOrganizationVoResultBean.getData().getPsid());
if(sysOrganizationVoResultBeanP.getData() != null){
ogrName=sysOrganizationVoResultBean.getData().getName();
flowTask.setStartDeptName(ogrName+"-"+sysOrganizationVoResultBean.getData().getName());
}
}else{
flowTask.setStartDeptName(sysOrganizationVoResultBean.getData().getName());
}
}
}else{
ResultBean<String> pathSidByUserSid = sysStaffOrgFeign.getPathSidByUserSid(sysUserVoResultBean.getData().getSid());
if(pathSidByUserSid.getData()!=null){
ResultBean<SysOrganizationVo> sysOrganizationVoResultBean = sysOrganizationFeign.fetchBySid(pathSidByUserSid.getData());
ogrName=sysOrganizationVoResultBean.getData().getName();
}
flowTask.setStartDeptName(ogrName+"-"+sysUserVoResultBean.getData().getOrganizationName());
}
hisTaskList.add(flowTask); hisTaskList.add(flowTask);
} }
page.setTotal(count); page.setTotal(count);
@ -895,7 +926,7 @@ public class FlowTaskService extends MybatisBaseService<FlowTaskMapper, FlowTask
ResultBean<SysUserVo> sysUserVoResultBean = sysUserFeign.fetchBySid(histTask.get("START_USER_ID_").toString()); ResultBean<SysUserVo> sysUserVoResultBean = sysUserFeign.fetchBySid(histTask.get("START_USER_ID_").toString());
flowTask.setStartUserSid(sysUserVoResultBean.getData().getSid()); flowTask.setStartUserSid(sysUserVoResultBean.getData().getSid());
flowTask.setStartUserName(sysUserVoResultBean.getData().getName()); flowTask.setStartUserName(sysUserVoResultBean.getData().getName());
flowTask.setStartDeptName(sysUserVoResultBean.getData().getOrganizationName()); // flowTask.setStartDeptName(sysUserVoResultBean.getData().getOrganizationName());
HistoricTaskInstance historicTaskInstance = historyService.createHistoricTaskInstanceQuery().includeProcessVariables().taskId(flowTask.getTaskId()).singleResult(); HistoricTaskInstance historicTaskInstance = historyService.createHistoricTaskInstanceQuery().includeProcessVariables().taskId(flowTask.getTaskId()).singleResult();
flowTask.setProcessVariables(historicTaskInstance.getProcessVariables()); flowTask.setProcessVariables(historicTaskInstance.getProcessVariables());
Object end_act_id = histTask.get("end_act_id_"); Object end_act_id = histTask.get("end_act_id_");
@ -914,10 +945,32 @@ public class FlowTaskService extends MybatisBaseService<FlowTaskMapper, FlowTask
if(listResultBean.getData()!=null&&listResultBean.getData().size()>0){ if(listResultBean.getData()!=null&&listResultBean.getData().size()>0){
flowTask.setSysProUrlVo(listResultBean.getData().get(0)); flowTask.setSysProUrlVo(listResultBean.getData().get(0));
} }
// 设置手机端参数 //发起人部门
// Map<String, Map<String, Object>> map = getAppOrPcVariables(flowTask); String createOrgPath = ConstantUtils.getString(flowTask.getProcessVariables(),"createOrgPath","");
// flowTask.setAppVariables(map.get("appVariables")); String ogrName="";
// flowTask.setPcVariables(map.get("pcVariables")); if(StringUtils.isNotBlank(createOrgPath)){
List<String> stringList = Arrays.asList(createOrgPath.split("/"));
ResultBean<SysOrganizationVo> sysOrganizationVoResultBean = sysOrganizationFeign.fetchBySid(stringList.get(stringList.size()-1));
if(sysOrganizationVoResultBean.getData() != null){
if(StringUtils.isNotBlank(sysOrganizationVoResultBean.getData().getPsid())){
ResultBean<SysOrganizationVo> sysOrganizationVoResultBeanP = sysOrganizationFeign.fetchBySid(sysOrganizationVoResultBean.getData().getPsid());
if(sysOrganizationVoResultBeanP.getData() != null){
ogrName=sysOrganizationVoResultBean.getData().getName();
flowTask.setStartDeptName(ogrName+"-"+sysOrganizationVoResultBean.getData().getName());
}
}else{
flowTask.setStartDeptName(sysOrganizationVoResultBean.getData().getName());
}
}
}else{
ResultBean<String> pathSidByUserSid = sysStaffOrgFeign.getPathSidByUserSid(sysUserVoResultBean.getData().getSid());
if(pathSidByUserSid.getData()!=null){
ResultBean<SysOrganizationVo> sysOrganizationVoResultBean = sysOrganizationFeign.fetchBySid(pathSidByUserSid.getData());
ogrName=sysOrganizationVoResultBean.getData().getName();
}
flowTask.setStartDeptName(ogrName+"-"+sysUserVoResultBean.getData().getOrganizationName());
}
hisTaskList.add(flowTask); hisTaskList.add(flowTask);
} }
@ -1977,7 +2030,26 @@ public class FlowTaskService extends MybatisBaseService<FlowTaskMapper, FlowTask
if(sysUserVoResultBean.getData() != null) { if(sysUserVoResultBean.getData() != null) {
flowTask.setStartUserSid(sysUserVoResultBean.getData().getSid()); flowTask.setStartUserSid(sysUserVoResultBean.getData().getSid());
flowTask.setStartUserName(sysUserVoResultBean.getData().getName()); flowTask.setStartUserName(sysUserVoResultBean.getData().getName());
flowTask.setStartDeptName(sysUserVoResultBean.getData().getOrganizationName()); // flowTask.setStartDeptName(sysUserVoResultBean.getData().getOrganizationName());
String createOrgPath = ConstantUtils.getString(flowTask.getProcessVariables(),"createOrgPath","");
String ogrName="";
if(StringUtils.isNotBlank(createOrgPath)){
List<String> stringList = Arrays.asList(createOrgPath.split("/"));
ResultBean<SysOrganizationVo> sysOrganizationVoResultBean = sysOrganizationFeign.fetchBySid(stringList.get(stringList.size()-1));
if(sysOrganizationVoResultBean.getData() != null){
if(StringUtils.isNotBlank(sysOrganizationVoResultBean.getData().getPsid())){
ResultBean<SysOrganizationVo> sysOrganizationVoResultBeanP = sysOrganizationFeign.fetchBySid(sysOrganizationVoResultBean.getData().getPsid());
if(sysOrganizationVoResultBeanP.getData() != null){
ogrName=sysOrganizationVoResultBean.getData().getName();
flowTask.setStartDeptName(ogrName+"-"+sysOrganizationVoResultBean.getData().getName());
}
}else{
flowTask.setStartDeptName(sysOrganizationVoResultBean.getData().getName());
}
}
}else{
flowTask.setStartDeptName(sysUserVoResultBean.getData().getOrganizationName());
}
} }
ResultBean<SysUserVo> sysUserVoResultBean2 = sysUserFeign.fetchBySid(userSid); ResultBean<SysUserVo> sysUserVoResultBean2 = sysUserFeign.fetchBySid(userSid);
if(sysUserVoResultBean2.getData() != null) { if(sysUserVoResultBean2.getData() != null) {

20
anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysuser/SysHaveMessageQuery.java

@ -0,0 +1,20 @@
package com.yxt.anrui.portal.api.sysuser;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author dimengzhe
* @Date 2023/1/13 9:43
* @Description
*/
@Data
public class SysHaveMessageQuery implements Query {
private static final long serialVersionUID = -6612866428143416220L;
@ApiModelProperty("菜单路由")
private String menuUrl;
@ApiModelProperty("组织全路径sid")
private String orgPath;
}

16
anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysuser/SysUserFeign.java

@ -184,7 +184,7 @@ public interface SysUserFeign {
@ApiOperation(value = "根据用户的sid查询用户的组织信息") @ApiOperation(value = "根据用户的sid查询用户的组织信息")
@ResponseBody @ResponseBody
@GetMapping("/selectUserInfoByUserSid/{userSid}/{orgSid}") @GetMapping("/selectUserInfoByUserSid/{userSid}/{orgSid}")
public ResultBean<SysUserInfoVo> selectUserInfoByUserSid(@PathVariable("userSid") String userSid,@PathVariable("orgSid") String orgSid); public ResultBean<SysUserInfoVo> selectUserInfoByUserSid(@PathVariable("userSid") String userSid, @PathVariable("orgSid") String orgSid);
@PostMapping("/setIsEnable/{sid}/{isEnable}") @PostMapping("/setIsEnable/{sid}/{isEnable}")
@ResponseBody @ResponseBody
@ -229,22 +229,22 @@ public interface SysUserFeign {
@ApiOperation(value = "根据用户sid查询该分公司下所有销售经理的用户") @ApiOperation(value = "根据用户sid查询该分公司下所有销售经理的用户")
@GetMapping(value = "selectSysUserList") @GetMapping(value = "selectSysUserList")
ResultBean<List<SysUserListVo>> selectSysUserList(@RequestParam("userSid") String userSid); ResultBean<List<SysUserListVo>> selectSysUserList(@RequestParam("orgPath") String userSid, @RequestParam(value = "orgPath", required = false) String orgPath);
@ApiOperation(value = "查询是否需要更换密码") @ApiOperation(value = "查询是否需要更换密码")
@GetMapping(value = "/selectPasswordByUserSid/{userSid}") @GetMapping(value = "/selectPasswordByUserSid/{userSid}")
ResultBean<Boolean> selectPasswordByUserSid(@PathVariable("userSid")String userSid); ResultBean<Boolean> selectPasswordByUserSid(@PathVariable("userSid") String userSid);
/** /**
* 查询该菜单是否允许创建是否有提醒消息 * 查询该菜单是否允许创建是否有提醒消息
* @param menuSid 菜单sid *
* @param orgPath 当前组织机构全路径sid
* @return * @return
*/ */
@ApiOperation(value = "查询该菜单是否允许创建,是否有提醒消息") @ApiOperation(value = "查询该菜单是否允许创建,是否有提醒消息")
@GetMapping(value = "/selectHaveMessage") @PostMapping(value = "/selectHaveMessage")
ResultBean selectHaveMessage(@RequestParam("menuSid")String menuSid,@RequestParam("orgPath")String orgPath); ResultBean selectHaveMessage(@RequestBody SysHaveMessageQuery sysHaveMessageQuery);
@ApiOperation(value = "根据用户sid获取当前用户所有的组织机构list") @ApiOperation(value = "根据用户sid获取当前用户所有的组织机构list")
@GetMapping(value = "/getOrgListByUserSid") @GetMapping(value = "/getOrgListByUserSid")
ResultBean<List<OrgList>> getOrgListByUserSid(@RequestParam("userSid")String userSid); ResultBean<List<OrgList>> getOrgListByUserSid(@RequestParam("userSid") String userSid);
} }

4
anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysuser/SysUserFeignFallback.java

@ -207,7 +207,7 @@ public class SysUserFeignFallback implements SysUserFeign {
} }
@Override @Override
public ResultBean<List<SysUserListVo>> selectSysUserList(String userSid) { public ResultBean<List<SysUserListVo>> selectSysUserList(String userSid,String orgPath) {
return null; return null;
} }
@ -217,7 +217,7 @@ public class SysUserFeignFallback implements SysUserFeign {
} }
@Override @Override
public ResultBean selectHaveMessage(String menuSid, String orgPath) { public ResultBean selectHaveMessage(SysHaveMessageQuery sysHaveMessageQuery) {
return null; return null;
} }

2
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysmenu/SysMenuMapper.java

@ -72,4 +72,6 @@ public interface SysMenuMapper extends BaseMapper<SysMenu> {
* @return * @return
*/ */
int selectBySourceSid(@Param("isEnable") int isEnable, @Param("sourceSid") String sourceSid); int selectBySourceSid(@Param("isEnable") int isEnable, @Param("sourceSid") String sourceSid);
List<SysMenu> selectByMenuUrl(String menuUrl);
} }

4
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysmenu/SysMenuMapper.xml

@ -59,4 +59,8 @@
where isEnable = #{isEnable} where isEnable = #{isEnable}
and sourceSid = #{sourceSid} and sourceSid = #{sourceSid}
</select> </select>
<select id="selectByMenuUrl" resultType="com.yxt.anrui.portal.api.sysmenu.SysMenu">
select * from sys_menu where menuUrl = #{menuUrl}
</select>
</mapper> </mapper>

4
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysmenu/SysMenuService.java

@ -409,4 +409,8 @@ public class SysMenuService extends MybatisBaseService<SysMenuMapper, SysMenu> {
sysSourceMenuService.save(sysSourceMenu); sysSourceMenuService.save(sysSourceMenu);
save(entity); save(entity);
} }
public List<SysMenu> selectByMenuUrl(String menuUrl) {
return baseMapper.selectByMenuUrl(menuUrl);
}
} }

8
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserRest.java

@ -626,8 +626,8 @@ public class SysUserRest implements SysUserFeign {
} }
@Override @Override
public ResultBean<List<SysUserListVo>> selectSysUserList(String userSid) { public ResultBean<List<SysUserListVo>> selectSysUserList(String userSid,String orgPath) {
return sysUserService.selectSysUserList(userSid); return sysUserService.selectSysUserList(userSid,orgPath);
} }
@Override @Override
@ -636,8 +636,8 @@ public class SysUserRest implements SysUserFeign {
} }
@Override @Override
public ResultBean selectHaveMessage(String menuSid, String orgPath) { public ResultBean selectHaveMessage(SysHaveMessageQuery sysHaveMessageQuery) {
return sysUserService.selectHaveMessage(menuSid,orgPath); return sysUserService.selectHaveMessage(sysHaveMessageQuery);
} }
@Override @Override

59
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserService.java

@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.anrui.crm.api.crmcustomer.CrmCustomer; import com.yxt.anrui.crm.api.crmcustomer.CrmCustomer;
import com.yxt.anrui.crm.api.crmcustomer.CrmCustomerFeign; import com.yxt.anrui.crm.api.crmcustomer.CrmCustomerFeign;
import com.yxt.anrui.portal.api.sms.SmsFeign; import com.yxt.anrui.portal.api.sms.SmsFeign;
import com.yxt.anrui.portal.api.sysmenu.SysMenu;
import com.yxt.anrui.portal.api.sysorganization.SysOrganization; import com.yxt.anrui.portal.api.sysorganization.SysOrganization;
import com.yxt.anrui.portal.api.sysstaffinfo.SysStaffinfo; import com.yxt.anrui.portal.api.sysstaffinfo.SysStaffinfo;
import com.yxt.anrui.portal.api.sysstaffinfo.SysStaffinfoVo; import com.yxt.anrui.portal.api.sysstaffinfo.SysStaffinfoVo;
@ -20,6 +21,7 @@ import com.yxt.anrui.portal.api.sysuser.wx.WxHomePageVo;
import com.yxt.anrui.portal.api.sysuser.wx.WxMySysUserInfoVo; import com.yxt.anrui.portal.api.sysuser.wx.WxMySysUserInfoVo;
import com.yxt.anrui.portal.api.sysuser.wx.WxSysUserVo; import com.yxt.anrui.portal.api.sysuser.wx.WxSysUserVo;
import com.yxt.anrui.portal.api.sysuserdefaultorg.SysUserDefaultOrg; import com.yxt.anrui.portal.api.sysuserdefaultorg.SysUserDefaultOrg;
import com.yxt.anrui.portal.biz.sysmenu.SysMenuService;
import com.yxt.anrui.portal.biz.sysorganization.SysOrganizationService; import com.yxt.anrui.portal.biz.sysorganization.SysOrganizationService;
import com.yxt.anrui.portal.biz.sysrole.SysRoleService; import com.yxt.anrui.portal.biz.sysrole.SysRoleService;
import com.yxt.anrui.portal.biz.sysstaffinfo.SysStaffinfoService; import com.yxt.anrui.portal.biz.sysstaffinfo.SysStaffinfoService;
@ -105,6 +107,8 @@ public class SysUserService extends MybatisBaseService<SysUserMapper, SysUser> {
@Autowired @Autowired
private SysUserDefaultOrgService sysUserDefaultOrgService; private SysUserDefaultOrgService sysUserDefaultOrgService;
@Autowired
private SysMenuService sysMenuService;
public PagerVo<SysUser> listPage(PagerQuery<SysUserQuery> pq) { public PagerVo<SysUser> listPage(PagerQuery<SysUserQuery> pq) {
@ -1100,17 +1104,21 @@ public class SysUserService extends MybatisBaseService<SysUserMapper, SysUser> {
return rb.success().setData(sysUserVoList); return rb.success().setData(sysUserVoList);
} }
public ResultBean<List<SysUserListVo>> selectSysUserList(String userSid) { public ResultBean<List<SysUserListVo>> selectSysUserList(String userSid,String orgPath) {
ResultBean<List<SysUserListVo>> rb = ResultBean.fireFail(); ResultBean<List<SysUserListVo>> rb = ResultBean.fireFail();
//销售经理角色sid //销售经理角色sid
String roleSid = "f07e98d3-d179-48ee-a5ff-5928addead3f"; String roleSid = "f07e98d3-d179-48ee-a5ff-5928addead3f";
//根据用户sid查询用户的部门全路径
SysUserVo vo = fetchBySidVo(userSid);
//根据staffSid获取用户的组织全路径
SysStaffOrg sysStaffOrg = sysStaffOrgService.getOrgByStaffSid(vo.getStaffSid());
UserQuery userRoleQuery = new UserQuery(); UserQuery userRoleQuery = new UserQuery();
if(StringUtils.isNotBlank(orgPath)){
userRoleQuery.setOrgSidPath(orgPath);
}else{
//根据用户sid查询用户的部门全路径
SysUserVo vo = fetchBySidVo(userSid);
//根据staffSid获取用户的组织全路径
SysStaffOrg sysStaffOrg = sysStaffOrgService.getOrgByStaffSid(vo.getStaffSid());
userRoleQuery.setOrgSidPath(sysStaffOrg.getOrgSidPath());
}
userRoleQuery.setRoleSid(roleSid); userRoleQuery.setRoleSid(roleSid);
userRoleQuery.setOrgSidPath(sysStaffOrg.getOrgSidPath());
ResultBean<List<SysUserVo>> resultBean = getUserByRole(userRoleQuery); ResultBean<List<SysUserVo>> resultBean = getUserByRole(userRoleQuery);
List<SysUserVo> sysUserVoList = resultBean.getData(); List<SysUserVo> sysUserVoList = resultBean.getData();
sysUserVoList.removeAll(Collections.singleton(null)); sysUserVoList.removeAll(Collections.singleton(null));
@ -1152,8 +1160,10 @@ public class SysUserService extends MybatisBaseService<SysUserMapper, SysUser> {
return baseMapper.updateAppIdNull(appId); return baseMapper.updateAppIdNull(appId);
} }
public ResultBean selectHaveMessage(String menuSid, String orgPath) { public ResultBean selectHaveMessage(SysHaveMessageQuery sysHaveMessageQuery) {
ResultBean rb = ResultBean.fireFail(); ResultBean rb = ResultBean.fireFail();
String menuUrl = sysHaveMessageQuery.getMenuUrl();
String orgPath = sysHaveMessageQuery.getOrgPath();
//根据orgPath 查询当前组织所管理的层级 //根据orgPath 查询当前组织所管理的层级
List<String> orgPathsList = Arrays.asList(orgPath.split("/")); List<String> orgPathsList = Arrays.asList(orgPath.split("/"));
String orgSid = orgPathsList.get(orgPathsList.size()-1); String orgSid = orgPathsList.get(orgPathsList.size()-1);
@ -1161,20 +1171,29 @@ public class SysUserService extends MybatisBaseService<SysUserMapper, SysUser> {
if(sysOrganization == null){ if(sysOrganization == null){
return rb.setMsg("当前所在组织机构不存在"); return rb.setMsg("当前所在组织机构不存在");
} }
//根据菜单sid查询所授权的角色 //根据菜单路由查询菜单的sid
List<SysMenuRoleVoList> list = sysRoleService.selectRoleList(menuSid); List<SysMenu> sysMenuList = sysMenuService.selectByMenuUrl(menuUrl);
list.removeAll(Collections.singleton(null)); if(sysMenuList.size()>1){
if(!list.isEmpty()){ return rb.setMsg("当前菜单的路由存在多个,请联系管理员");
List<String> typeList = list.stream().map(v->v.getRoleType()).collect(Collectors.toList()); }else if(sysMenuList.size() == 0){
if(StringUtils.isBlank(sysOrganization.getOrgLevelKey())){ return rb.setMsg("当前菜单不存在");
return rb.setMsg("当前组织未设置管理层级");
}
if(!typeList.contains(sysOrganization.getOrgLevelKey())){
return rb.setMsg("请检查当前菜单是否为目前机构层级对应的角色");
}
}else{ }else{
return rb.setMsg("当前菜单未授权角色权限"); String menuSid = sysMenuList.get(0).getSid();
//根据菜单sid查询所授权的角色
List<SysMenuRoleVoList> list = sysRoleService.selectRoleList(menuSid);
list.removeAll(Collections.singleton(null));
if(!list.isEmpty()){
List<String> typeList = list.stream().map(v->v.getRoleType()).collect(Collectors.toList());
if(StringUtils.isBlank(sysOrganization.getOrgLevelKey())){
return rb.setMsg("当前组织未设置管理层级");
}
if(!typeList.contains(sysOrganization.getOrgLevelKey())){
return rb.setMsg("请检查当前菜单是否为目前机构层级对应的角色");
}
}else{
return rb.setMsg("当前菜单未授权角色权限");
}
} }
return rb.success(); return rb.success();
} }

20
anrui-scm/anrui-scm-ui/src/api/cheliang/dictcommons.js

@ -67,6 +67,16 @@ export function getPathSidByUserSid(data) {
params: data params: data
}) })
} }
// 根据当前登录人orgSidPath(全路径sid)查询分公司
export function getOrgSidByPath(data) {
return request({
url: '/portal/v1/sysstafforg/getOrgSidByPath',
method: 'get',
params: data
})
}
// 根据分公司sid查询分公司名称 // 根据分公司sid查询分公司名称
export function fetchBySid(sid) { export function fetchBySid(sid) {
return request({ return request({
@ -205,3 +215,13 @@ export function selectOrgByLevel(data) {
}) })
} }
// 当前用户创建申请时判断该用户是否有该菜单的操作权限
export function selectHaveMessage(data) {
return request({
url: '/portal/v1/sysuser/selectHaveMessage ',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
}

2
anrui-scm/anrui-scm-ui/src/layout/components/Navbar.vue

@ -28,7 +28,7 @@
mounted() { mounted() {
this.Orgname = window.sessionStorage.getItem('Orgname') this.Orgname = window.sessionStorage.getItem('Orgname')
this.departmentName = window.sessionStorage.getItem('departmentName') this.departmentName = window.sessionStorage.getItem('departmentName')
this.pNameAndDepartmentNameAndPostName = window.sessionStorage.getItem('pNameAndDepartmentNameAndPostName') this.pNameAndDepartmentNameAndPostName = window.sessionStorage.getItem('defaultOrgPathName')
this.name = window.sessionStorage.getItem('name') this.name = window.sessionStorage.getItem('name')
var nowDate = new Date() var nowDate = new Date()
this.year = nowDate.getFullYear() this.year = nowDate.getFullYear()

17
anrui-scm/anrui-scm-ui/src/main.js

@ -16,7 +16,7 @@ import eimage from '@/components/E-image/index.vue'
import moment from 'moment' import moment from 'moment'
import Print from '@/utils/print' // 引入附件的js文件 import Print from '@/utils/print' // 引入附件的js文件
import request from '@/utils/request' import request from '@/utils/request'
import { setStorage } from './utils/auth.js' import { setDefaultOrgPath, setDefaultOrgPathName, setStorage } from './utils/auth.js'
import VueAMap from 'vue-amap' import VueAMap from 'vue-amap'
Vue.use(ElementUI) Vue.use(ElementUI)
@ -52,6 +52,17 @@ if (token) {
// window.location.href = href.slice(0, href.length - 1) // window.location.href = href.slice(0, href.length - 1)
} }
var one = window.location.href.indexOf('&organizationData') + 18
if (parseInt(one) > 18) {
const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用
var data1 = decodeURIComponent(data)
if (data1 !== undefined) {
const obj = JSON.parse(data1)
setDefaultOrgPath(obj.defaultOrgPath)
setDefaultOrgPathName(obj.defaultOrgPathName)
}
}
// 获取登录用户信息 // 获取登录用户信息
function getUserInfo() { function getUserInfo() {
return request({ return request({
@ -75,8 +86,7 @@ function getUserInfo() {
Orgname: data.organizationName, Orgname: data.organizationName,
dwjb: data.dwjb, dwjb: data.dwjb,
orgNamePath: data.orgNamePath, // 使用组织全路径名称 orgNamePath: data.orgNamePath, // 使用组织全路径名称
orgSidPath: data.orgSidPath, // 使用组织全路径Sid orgSidPath: data.orgSidPath // 使用组织全路径Sid
pNameAndDepartmentNameAndPostName:data.pNameAndDepartmentNameAndPostName
} }
// 结果存入缓存 // 结果存入缓存
window.sessionStorage.setItem('staffSid', user.staffSid) window.sessionStorage.setItem('staffSid', user.staffSid)
@ -90,7 +100,6 @@ function getUserInfo() {
window.sessionStorage.setItem('departmentSid', user.departmentSid) window.sessionStorage.setItem('departmentSid', user.departmentSid)
window.sessionStorage.setItem('orgNamePath', user.orgNamePath) window.sessionStorage.setItem('orgNamePath', user.orgNamePath)
window.sessionStorage.setItem('orgSidPath', user.orgSidPath) window.sessionStorage.setItem('orgSidPath', user.orgSidPath)
window.sessionStorage.setItem('pNameAndDepartmentNameAndPostName', user.pNameAndDepartmentNameAndPostName)
new Vue({ new Vue({
el: '#app', el: '#app',
router, router,

6
anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js

@ -316,13 +316,13 @@ const codemenu = [
path: '/vehicle/cheliangpaichan', path: '/vehicle/cheliangpaichan',
component: () => import('@/views/supplychain/cheliangpaichan/cheliangpaichan.vue'), component: () => import('@/views/supplychain/cheliangpaichan/cheliangpaichan.vue'),
name: 'cheliangpaichan', name: 'cheliangpaichan',
meta: { title: '厂家采购', noCache: true } meta: { title: '厂家采购', noCache: false }
}, },
{ {
path: '/vehicle/paichandingjintobeconfirmed', path: '/vehicle/paichandingjintobeconfirmed',
component: () => import('@/views/supplychain/paichandingjin/paichandingjintobeconfirmed.vue'), component: () => import('@/views/supplychain/paichandingjin/paichandingjintobeconfirmed.vue'),
name: 'paichandingjindaiqueren', name: 'paichandingjindaiqueren',
meta: { title: '排产订金申请确认', noCache: true } meta: { title: '排产订金申请确认', noCache: false }
} }
] ]
}, },
@ -338,7 +338,7 @@ const codemenu = [
path: '/supplychain/changjiaxitong', path: '/supplychain/changjiaxitong',
component: () => import('@/views/supplychain/changjiaxitong/manufacturers.vue'), component: () => import('@/views/supplychain/changjiaxitong/manufacturers.vue'),
name: 'changjiaxitongrenkuan', name: 'changjiaxitongrenkuan',
meta: { title: '厂家系统认款', noCache: true } meta: { title: '厂家系统认款', noCache: false }
} }
] ]
}, },

8
anrui-scm/anrui-scm-ui/src/utils/auth.js

@ -24,6 +24,14 @@ export function setStorage(session) {
return sessionStorage.setItem('token', session) return sessionStorage.setItem('token', session)
} }
export function setDefaultOrgPathName(data) {
return sessionStorage.setItem('defaultOrgPathName', data)
}
export function setDefaultOrgPath(data) {
return sessionStorage.setItem('defaultOrgPath', data)
}
export function removeStorage() { export function removeStorage() {
return sessionStorage.removeItem('token') return sessionStorage.removeItem('token')
} }

18
anrui-scm/anrui-scm-ui/src/views/supplychain/cheliangpaichan/cheliangpaichan.vue

@ -90,6 +90,7 @@ import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import pageye from '@/components/pagination/pageye'
import divAdd from './cheliangpaichanAdd' import divAdd from './cheliangpaichanAdd'
import divInfo from './cheliangpaichanInfo' import divInfo from './cheliangpaichanInfo'
import { selectHaveMessage } from '@/api/cheliang/dictcommons'
import { getStorage } from '@/utils/auth' import { getStorage } from '@/utils/auth'
export default { export default {
@ -157,7 +158,8 @@ export default {
applicationDateEnd: '', applicationDateEnd: '',
applyTypeKey: '', applyTypeKey: '',
schedulingTypeKey: '', schedulingTypeKey: '',
userSid: '' userSid: '',
orgPath: ''
} }
}, },
row: {} row: {}
@ -247,9 +249,13 @@ export default {
this.nodeState_list = bb this.nodeState_list = bb
console.log('获取sids数组', this.sids) console.log('获取sids数组', this.sids)
}, },
toAdd(row) { toAdd() {
this.viewState = 2 selectHaveMessage({ menuUrl: this.$route.path, orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => {
this.$refs['divadd'].showAdd() if (resp.success) {
this.viewState = 2
this.$refs['divadd'].showAdd()
}
})
}, },
toInfo(row) { toInfo(row) {
this.viewState = 4 this.viewState = 4
@ -278,7 +284,8 @@ export default {
applicationDateEnd: '', applicationDateEnd: '',
applyTypeKey: '', applyTypeKey: '',
schedulingTypeKey: '', schedulingTypeKey: '',
userSid: '' userSid: '',
orgPath: ''
} }
} }
this.dosearch() this.dosearch()
@ -287,6 +294,7 @@ export default {
loadList() { loadList() {
this.tableLoading = true this.tableLoading = true
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid') this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
req.listPage(this.queryParams).then(resp => { req.listPage(this.queryParams).then(resp => {
console.log('查询列表', resp) console.log('查询列表', resp)
this.tableLoading = false this.tableLoading = false

29
anrui-scm/anrui-scm-ui/src/views/supplychain/cheliangpaichan/cheliangpaichanAdd.vue

@ -187,7 +187,7 @@ import configuration from './chexingbyconfiguration'
import shangzhuangpeizhi from '../../../views/supplychain/cheliangpaichan/shangzhuangselect/shangzhuangpeizhi' import shangzhuangpeizhi from '../../../views/supplychain/cheliangpaichan/shangzhuangselect/shangzhuangpeizhi'
import shangzhuangpeizhiAdd from '../../../views/supplychain/cheliangpaichan/shangzhuangselect/shangzhuangpeizhiAdd' import shangzhuangpeizhiAdd from '../../../views/supplychain/cheliangpaichan/shangzhuangselect/shangzhuangpeizhiAdd'
import vehicleconfiguration from '@/views/cheliang/cheliangcaigou/relation/vehicleconfiguration' import vehicleconfiguration from '@/views/cheliang/cheliangcaigou/relation/vehicleconfiguration'
import { getPathSidByUserSid, fetchBySid, selectSysUserList, fetchDetailsByUseOrgSid, brandDown, selectNameByOrg } from '@/api/cheliang/dictcommons' import { getOrgSidByPath, fetchBySid, selectSysUserList, fetchDetailsByUseOrgSid, brandDown, selectNameByOrg } from '@/api/cheliang/dictcommons'
export default { export default {
name: 'cheliangpaichanAdd', name: 'cheliangpaichanAdd',
@ -238,6 +238,7 @@ export default {
orgDeptSid: '', orgDeptSid: '',
carBrandName: '', carBrandName: '',
carBrandSid: '', carBrandSid: '',
orgPath: '',
busVehicleApplyDetailList: [] busVehicleApplyDetailList: []
}, },
rules: {}, rules: {},
@ -256,14 +257,14 @@ export default {
this.applyType_list = res.data this.applyType_list = res.data
} }
}) })
selectSysUserList({ userSid: window.sessionStorage.getItem('userSid') }).then((resp) => { selectSysUserList({ userSid: window.sessionStorage.getItem('userSid'), orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => {
if (resp.success) { if (resp.success) {
this.user_list = resp.data this.user_list = resp.data
} }
}) })
}, },
getUserOrg() { getUserOrg() {
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((resp) => { getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => {
if (resp.success) { if (resp.success) {
this.formobj.createOrgSid = resp.data this.formobj.createOrgSid = resp.data
fetchBySid(this.formobj.createOrgSid).then((response) => { fetchBySid(this.formobj.createOrgSid).then((response) => {
@ -294,17 +295,13 @@ export default {
}) })
}, },
newDate() { newDate() {
let date = new Date() var nowDate = new Date()
let year = date.getFullYear() // var date = {
let month = date.getMonth() + 1 // year: nowDate.getFullYear(),
let day = date.getDate() // month: nowDate.getMonth() + 1,
if (month < 10) { day: nowDate.getDate()
month = '0' + month
} }
if (day < 10) { this.formobj.applicationDate = date.year + '-' + (date.month >= 10 ? date.month : '0' + date.month) + '-' + (date.day >= 10 ? date.day : '0' + date.day)
day = '0' + day
}
this.formobj.applicationDate = year + '-' + month + '-' + day
}, },
oninput(val, limit = 0) { oninput(val, limit = 0) {
val = val.replace(/[^\d]/g, '') // val = val.replace(/[^\d]/g, '') //
@ -328,7 +325,7 @@ export default {
return return
} }
this.viewState = 2 this.viewState = 2
this.$refs['divconfiguration'].showData(this.formobj.busVehicleApplyDetailList, this.formobj.carBrandSid) this.$refs['divconfiguration'].showData(this.formobj.busVehicleApplyDetailList, this.formobj.carBrandSid, this.formobj.createOrgSid)
}, },
handleLook(row) { handleLook(row) {
this.viewState = 5 this.viewState = 5
@ -353,6 +350,7 @@ export default {
}) })
this.dialogStatus = 'add' this.dialogStatus = 'add'
this.viewTitle = '【新增】厂家采购' this.viewTitle = '【新增】厂家采购'
this.formobj.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.formobj.createBySid = window.sessionStorage.getItem('userSid') this.formobj.createBySid = window.sessionStorage.getItem('userSid')
this.formobj.createByName = window.sessionStorage.getItem('name') this.formobj.createByName = window.sessionStorage.getItem('name')
}, },
@ -574,7 +572,7 @@ export default {
}, },
handleShangZhuang(index) { handleShangZhuang(index) {
this.viewState = 3 this.viewState = 3
this.$refs['divShangzhuangpeizhi'].showData(index) this.$refs['divShangzhuangpeizhi'].showData(index, this.formobj.createOrgSid)
}, },
backPeizhi(val, index) { backPeizhi(val, index) {
this.viewState = 1 this.viewState = 1
@ -665,6 +663,7 @@ export default {
this.formobj.orgDeptSid = '' this.formobj.orgDeptSid = ''
this.formobj.carBrandName = '' this.formobj.carBrandName = ''
this.formobj.carBrandSid = '' this.formobj.carBrandSid = ''
this.formobj.orgPath = ''
this.user_list = [] this.user_list = []
this.submitdisabled = false this.submitdisabled = false
this.formobj.busVehicleApplyDetailList = [] this.formobj.busVehicleApplyDetailList = []

18
anrui-scm/anrui-scm-ui/src/views/supplychain/cheliangpaichan/chexingbyconfiguration.vue

@ -133,15 +133,6 @@ export default {
handleReturn() { handleReturn() {
this.$emit('doback') this.$emit('doback')
}, },
getPathSid() {
const userSid = window.sessionStorage.getItem('userSid')
getPathSidByUserSid({ userSid: userSid }).then((res) => {
if (res.success) {
this.listQuery.params.useOrgSid = res.data
this.getList()
}
})
},
// //
getList() { getList() {
this.listLoading = true this.listLoading = true
@ -156,7 +147,7 @@ export default {
// //
handleFilter() { handleFilter() {
this.listQuery.current = 1 this.listQuery.current = 1
this.getPathSid() this.getList()
}, },
// //
handresetting() { handresetting() {
@ -168,7 +159,7 @@ export default {
this.listQuery.params.useOrgSid = '' this.listQuery.params.useOrgSid = ''
this.listQuery.params.vehicleStateValue = '' this.listQuery.params.vehicleStateValue = ''
this.listQuery.params.insideCode = '' this.listQuery.params.insideCode = ''
this.getPathSid() this.getList()
}, },
handleSelectionChange(row) { handleSelectionChange(row) {
this.sids = [] this.sids = []
@ -187,7 +178,7 @@ export default {
}) })
this.sids = aa this.sids = aa
}, },
showData(value, carBrandSid) { showData(value, carBrandSid, createOrgSid) {
const aa = [] const aa = []
if (value.length > 0) { if (value.length > 0) {
for (var i = 0; i < value.length; i++) { for (var i = 0; i < value.length; i++) {
@ -204,7 +195,8 @@ export default {
this.listQuery.total = 0 this.listQuery.total = 0
this.listQuery.size = 5 this.listQuery.size = 5
this.listQuery.params.carBrandSid = carBrandSid this.listQuery.params.carBrandSid = carBrandSid
this.getPathSid() this.listQuery.params.useOrgSid = createOrgSid
this.getList()
}, },
// //
AddUpdateReturn() { AddUpdateReturn() {

49
anrui-scm/anrui-scm-ui/src/views/supplychain/cheliangpaichan/shangzhuangselect/shangzhuangpeizhi.vue

@ -146,13 +146,8 @@ export default {
}, },
methods: { methods: {
init() { init() {
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((res) => {
if (res.success) {
this.queryParams.params.createOrgSid = res.data
this.loadList()
}
})
this.DataDictionary() this.DataDictionary()
this.loadList()
}, },
DataDictionary() { DataDictionary() {
// //
@ -193,11 +188,12 @@ export default {
break break
} }
}, },
showData(index) { showData(index, createOrgSid) {
this.tableIndex = index this.tableIndex = index
this.queryParams.current = 1 this.queryParams.current = 1
this.queryParams.total = 0 this.queryParams.total = 0
this.queryParams.size = 5 this.queryParams.size = 5
this.queryParams.params.createOrgSid = createOrgSid
this.init() this.init()
}, },
dosearch() { dosearch() {
@ -205,32 +201,31 @@ export default {
this.init() this.init()
}, },
resetQuery() { resetQuery() {
this.queryParams = { this.queryParams.current = 1
current: 1, this.queryParams.size = 5
size: 5, this.queryParams.total = 0
total: 0, this.queryParams.params.vehicleTypeKey = ''
params: { this.queryParams.params.installNameKey = ''
vehicleTypeKey: '', this.queryParams.params.refitMethodKey = ''
installNameKey: '', this.queryParams.params.refitFactory = ''
refitMethodKey: '', this.queryParams.params.colorKey = ''
refitFactory: '', this.queryParams.params.plateMaterial = ''
colorKey: '',
plateMaterial: '',
createOrgSid: ''
}
}
this.init() this.init()
}, },
loadList() { loadList() {
const _this = this
this.tableLoading = true this.tableLoading = true
req.listPage(this.queryParams).then((resp) => { req.listPage(this.queryParams).then((resp) => {
_this.tableLoading = false this.tableLoading = false
const data = resp.data if (resp.success) {
_this.queryParams.total = data.total const data = resp.data
_this.dataList = data.records this.queryParams.total = data.total
this.dataList = data.records
} else {
this.queryParams.total = 0
this.dataList = []
}
}).catch(() => { }).catch(() => {
_this.tableLoading = false this.tableLoading = false
}) })
}, },
// //

15
anrui-scm/anrui-scm-ui/src/views/workFlow/paichanguanliFlow/paichanguanli/cheliangpaichanEdit.vue

@ -237,6 +237,7 @@ export default {
orgDeptSid: '', orgDeptSid: '',
carBrandSid: '', carBrandSid: '',
carBrandName: '', carBrandName: '',
orgPath: '',
busVehicleApplyDetailList: [] busVehicleApplyDetailList: []
}, },
rules: {}, rules: {},
@ -274,11 +275,6 @@ export default {
this.applyType_list = res.data this.applyType_list = res.data
} }
}) })
selectSysUserList({ userSid: window.sessionStorage.getItem('userSid') }).then((resp) => {
if (resp.success) {
this.user_list = resp.data
}
})
}, },
init() { init() {
@ -305,7 +301,7 @@ export default {
return return
} }
this.viewState = 2 this.viewState = 2
this.$refs['divconfiguration'].showData(this.formobj.busVehicleApplyDetailList, this.formobj.carBrandSid) this.$refs['divconfiguration'].showData(this.formobj.busVehicleApplyDetailList, this.formobj.carBrandSid, this.formobj.createOrgSid)
}, },
handleLook(row) { handleLook(row) {
this.viewState = 5 this.viewState = 5
@ -349,6 +345,11 @@ export default {
this.actualPay_list = res.data this.actualPay_list = res.data
} }
}) })
selectSysUserList({ userSid: window.sessionStorage.getItem('userSid'), orgPath: this.formobj.orgPath }).then((resp) => {
if (resp.success) {
this.user_list = resp.data
}
})
} }
}).catch((e) => { }).catch((e) => {
this.formobj = row this.formobj = row
@ -561,7 +562,7 @@ export default {
}, },
handleShangZhuang(index) { handleShangZhuang(index) {
this.viewState = 3 this.viewState = 3
this.$refs['divShangzhuangpeizhi'].showData(index) this.$refs['divShangzhuangpeizhi'].showData(index, this.formobj.createOrgSid)
}, },
backPeizhi(val, index) { backPeizhi(val, index) {
this.viewState = 1 this.viewState = 1

18
anrui-scm/anrui-scm-ui/src/views/workFlow/paichanguanliFlow/paichanguanli/chexingbyconfiguration.vue

@ -133,15 +133,6 @@ export default {
handleReturn() { handleReturn() {
this.$emit('doback') this.$emit('doback')
}, },
getPathSid() {
const userSid = window.sessionStorage.getItem('userSid')
getPathSidByUserSid({ userSid: userSid }).then((res) => {
if (res.success) {
this.listQuery.params.useOrgSid = res.data
this.getList()
}
})
},
// //
getList() { getList() {
this.listLoading = true this.listLoading = true
@ -156,7 +147,7 @@ export default {
// //
handleFilter() { handleFilter() {
this.listQuery.current = 1 this.listQuery.current = 1
this.getPathSid() this.getList()
}, },
// //
handresetting() { handresetting() {
@ -168,7 +159,7 @@ export default {
this.listQuery.params.useOrgSid = '' this.listQuery.params.useOrgSid = ''
this.listQuery.params.vehicleStateValue = '' this.listQuery.params.vehicleStateValue = ''
this.listQuery.params.insideCode = '' this.listQuery.params.insideCode = ''
this.getPathSid() this.getList()
}, },
handleSelectionChange(row) { handleSelectionChange(row) {
this.sids = [] this.sids = []
@ -187,7 +178,7 @@ export default {
}) })
this.sids = aa this.sids = aa
}, },
showData(value, carBrandSid) { showData(value, carBrandSid, createOrgSid) {
const aa = [] const aa = []
if (value.length > 0) { if (value.length > 0) {
for (var i = 0; i < value.length; i++) { for (var i = 0; i < value.length; i++) {
@ -204,7 +195,8 @@ export default {
this.listQuery.total = 0 this.listQuery.total = 0
this.listQuery.size = 5 this.listQuery.size = 5
this.listQuery.params.carBrandSid = carBrandSid this.listQuery.params.carBrandSid = carBrandSid
this.getPathSid() this.listQuery.params.useOrgSid = createOrgSid
this.getList()
}, },
// //
AddUpdateReturn() { AddUpdateReturn() {

49
anrui-scm/anrui-scm-ui/src/views/workFlow/paichanguanliFlow/paichanguanli/shangzhuangselect/shuangzhuangpeizhi.vue

@ -146,13 +146,8 @@ export default {
}, },
methods: { methods: {
init() { init() {
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((res) => {
if (res.success) {
this.queryParams.params.createOrgSid = res.data
this.loadList()
}
})
this.DataDictionary() this.DataDictionary()
this.loadList()
}, },
DataDictionary() { DataDictionary() {
// //
@ -193,11 +188,12 @@ export default {
break break
} }
}, },
showData(index) { showData(index, createOrgSid) {
this.tableIndex = index this.tableIndex = index
this.queryParams.current = 1 this.queryParams.current = 1
this.queryParams.total = 0 this.queryParams.total = 0
this.queryParams.size = 5 this.queryParams.size = 5
this.queryParams.params.createOrgSid = createOrgSid
this.init() this.init()
}, },
dosearch() { dosearch() {
@ -205,32 +201,31 @@ export default {
this.init() this.init()
}, },
resetQuery() { resetQuery() {
this.queryParams = { this.queryParams.current = 1
current: 1, this.queryParams.size = 5
size: 5, this.queryParams.total = 0
total: 0, this.queryParams.params.vehicleTypeKey = ''
params: { this.queryParams.params.installNameKey = ''
vehicleTypeKey: '', this.queryParams.params.refitMethodKey = ''
installNameKey: '', this.queryParams.params.refitFactory = ''
refitMethodKey: '', this.queryParams.params.colorKey = ''
refitFactory: '', this.queryParams.params.plateMaterial = ''
colorKey: '',
plateMaterial: '',
createOrgSid: ''
}
}
this.init() this.init()
}, },
loadList() { loadList() {
const _this = this
this.tableLoading = true this.tableLoading = true
req.listPage(this.queryParams).then((resp) => { req.listPage(this.queryParams).then((resp) => {
_this.tableLoading = false this.tableLoading = false
const data = resp.data if (resp.success) {
_this.queryParams.total = data.total const data = resp.data
_this.dataList = data.records this.queryParams.total = data.total
this.dataList = data.records
} else {
this.queryParams.total = 0
this.dataList = []
}
}).catch(() => { }).catch(() => {
_this.tableLoading = false this.tableLoading = false
}) })
}, },
// //

7
anrui-system-ui/src/api/User/login.js

@ -42,6 +42,13 @@ class user {
method: 'get' method: 'get'
}) })
} }
getOrgListByUserSid(data) {
return request({
url: '/portal/v1/sysuser/getOrgListByUserSid',
method: 'get',
params: data
})
}
} }
export default new user() export default new user()

6
anrui-system-ui/src/store/modules/user.js

@ -41,7 +41,9 @@ const actions = {
Orgname: data.organizationName, Orgname: data.organizationName,
dwjb: data.dwjb, dwjb: data.dwjb,
pNameAndDepartmentNameAndPostName: data.pNameAndDepartmentNameAndPostName, pNameAndDepartmentNameAndPostName: data.pNameAndDepartmentNameAndPostName,
roleName: data.roleName roleName: data.roleName,
defaultOrgPathName: data.defaultOrgPathName,
defaultOrgPath: data.defaultOrgPath
} }
commit('SET_UESRINFO', user) commit('SET_UESRINFO', user)
window.sessionStorage.setItem('userSid', user.userSid) window.sessionStorage.setItem('userSid', user.userSid)
@ -50,6 +52,8 @@ const actions = {
window.sessionStorage.setItem('name', user.name) window.sessionStorage.setItem('name', user.name)
window.sessionStorage.setItem('pNameAndDepartmentNameAndPostName', user.pNameAndDepartmentNameAndPostName) window.sessionStorage.setItem('pNameAndDepartmentNameAndPostName', user.pNameAndDepartmentNameAndPostName)
window.sessionStorage.setItem('roleName', user.roleName) window.sessionStorage.setItem('roleName', user.roleName)
window.sessionStorage.setItem('defaultOrgPathName', user.defaultOrgPathName)
window.sessionStorage.setItem('defaultOrgPath', user.defaultOrgPath)
resolve(data) resolve(data)
}).catch(error => { }).catch(error => {
reject(error) reject(error)

46
anrui-system-ui/src/views/Home/Home.vue

@ -3,10 +3,13 @@
<div class="header"> <div class="header">
<p class="title"><img src="../../assets/loginImg/logo.png"/>安瑞集团信息化平台</p> <p class="title"><img src="../../assets/loginImg/logo.png"/>安瑞集团信息化平台</p>
<div class="head_info"> <div class="head_info">
<!-- <p>{{Orgname}},</p>--> <p>欢迎您</p>
<!--<p>{{$store.getters.userInfo.Orgname}}</p>--> <p>
<p>欢迎您{{ pNameAndDepartmentNameAndPostName }} {{ roleName }} {{ name }}</p> <el-select v-model="defaultOrgPathName" class="selectStyle" size="small" placeholder="" @change="changeOrg" filterable>
<!--<img src="@/assets/images/info.png" />--> <el-option v-for="item in orgDept_list" :key="item.orgPath" :label="item.orgName" :value="item.orgName"/>
</el-select>
</p>
<p>{{ roleName }} {{ name }}</p>
<p @click="logout()" class="dy"><img src="@/assets/images/dy.png"/></p> <p @click="logout()" class="dy"><img src="@/assets/images/dy.png"/></p>
</div> </div>
</div> </div>
@ -238,6 +241,7 @@ export default {
title: '系统管理' title: '系统管理'
}], }],
userInfo: {}, userInfo: {},
orgDept_list: [],
shuliang: { shuliang: {
workCount: '' workCount: ''
}, },
@ -253,6 +257,8 @@ export default {
departmentName: '', departmentName: '',
name: '', name: '',
pNameAndDepartmentNameAndPostName: '', pNameAndDepartmentNameAndPostName: '',
defaultOrgPathName: '',
defaultOrgPath: '',
roleName: '', roleName: '',
year: '' year: ''
} }
@ -267,6 +273,8 @@ export default {
this.Orgname = window.sessionStorage.getItem('Orgname') this.Orgname = window.sessionStorage.getItem('Orgname')
this.departmentName = window.sessionStorage.getItem('departmentName') this.departmentName = window.sessionStorage.getItem('departmentName')
this.pNameAndDepartmentNameAndPostName = window.sessionStorage.getItem('pNameAndDepartmentNameAndPostName') this.pNameAndDepartmentNameAndPostName = window.sessionStorage.getItem('pNameAndDepartmentNameAndPostName')
this.defaultOrgPathName = window.sessionStorage.getItem('defaultOrgPathName')
this.defaultOrgPath = window.sessionStorage.getItem('defaultOrgPath')
this.roleName = window.sessionStorage.getItem('roleName') this.roleName = window.sessionStorage.getItem('roleName')
this.name = window.sessionStorage.getItem('name') this.name = window.sessionStorage.getItem('name')
var nowDate = new Date() var nowDate = new Date()
@ -285,6 +293,11 @@ export default {
this.timer = setInterval(this.getNum, 20000) this.timer = setInterval(this.getNum, 20000)
} }
}) })
User.getOrgListByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((res) => {
if (res.success) {
this.orgDept_list= res.data
}
})
}, },
getNum() { getNum() {
getTodoNum(window.sessionStorage.getItem('userSid')).then((resp) => { getTodoNum(window.sessionStorage.getItem('userSid')).then((resp) => {
@ -360,26 +373,41 @@ export default {
toNavbar(name) { toNavbar(name) {
let myPopup = window.open(name + '?token=' + getStorage(), '_blank') let myPopup = window.open(name + '?token=' + getStorage(), '_blank')
}, },
changeOrg(value) {
const choose = this.orgDept_list.filter((item) => item.orgName === value)
this.defaultOrgPathName = choose[0].orgName
this.defaultOrgPath = choose[0].orgPath
},
toNav(index, name, titleName) { toNav(index, name, titleName) {
const organizationData = {
defaultOrgPathName: this.defaultOrgPathName,
defaultOrgPath: this.defaultOrgPath
}
if (index == '9') { if (index == '9') {
// this.$router.push({path: '/index'}) // this.$router.push({path: '/index'})
let myPopup = window.open('/#/index', '_blank') let myPopup = window.open('/#/index', '_blank')
} else if (index == '7') { } else if (index == '7') {
// let myPopup = window.open('http://127.0.0.1:9531/base/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank')
let myPopup = window.open('http://anrui.yyundong.com/base/#/' + '?token=' + getStorage(), '_blank') let myPopup = window.open('http://anrui.yyundong.com/base/#/' + '?token=' + getStorage(), '_blank')
// let myPopup = window.open('http://120.46.172.184/base/#/' + '?token=' + getStorage(), '_blank') // let myPopup = window.open('http://120.46.172.184/base/#/' + '?token=' + getStorage(), '_blank')
} else if (index == '8') { } else if (index == '8') {
// let myPopup = window.open('http://127.0.0.1:9531/message/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank')
let myPopup = window.open('http://anrui.yyundong.com/message/#/' + '?token=' + getStorage(), '_blank') let myPopup = window.open('http://anrui.yyundong.com/message/#/' + '?token=' + getStorage(), '_blank')
// let myPopup = window.open('http://120.46.172.184/message/#/' + '?token=' + getStorage(), '_blank') // let myPopup = window.open('http://120.46.172.184/message/#/' + '?token=' + getStorage(), '_blank')
} else if (index == '1') { } else if (index == '1') {
let myPopup = window.open('http://anrui.yyundong.com/scm/#/' + '?token=' + getStorage(), '_blank') // let myPopup = window.open('http://127.0.0.1:9531/scm/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank')
let myPopup = window.open('http://anrui.yyundong.com/scm/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank')
// let myPopup = window.open('http://120.46.172.184/scm/#/' + '?token=' + getStorage(), '_blank') // let myPopup = window.open('http://120.46.172.184/scm/#/' + '?token=' + getStorage(), '_blank')
} else if (index == '4') { } else if (index == '4') {
// let myPopup = window.open('http://127.0.0.1:9531/fin/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank')
let myPopup = window.open('http://anrui.yyundong.com/fin/#/' + '?token=' + getStorage(), '_blank') let myPopup = window.open('http://anrui.yyundong.com/fin/#/' + '?token=' + getStorage(), '_blank')
// let myPopup = window.open('http://120.46.172.184/fin/#/' + '?token=' + getStorage(), '_blank') // let myPopup = window.open('http://120.46.172.184/fin/#/' + '?token=' + getStorage(), '_blank')
} else if (index == '5') { } else if (index == '5') {
// let myPopup = window.open('http://127.0.0.1:9531/manage/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank')
let myPopup = window.open('http://anrui.yyundong.com/manage/#/' + '?token=' + getStorage(), '_blank') let myPopup = window.open('http://anrui.yyundong.com/manage/#/' + '?token=' + getStorage(), '_blank')
// let myPopup = window.open('http://120.46.172.184/manage/#/' + '?token=' + getStorage(), '_blank') // let myPopup = window.open('http://120.46.172.184/manage/#/' + '?token=' + getStorage(), '_blank')
} else if (index == '0') { } else if (index == '0') {
// let myPopup = window.open('http://127.0.0.1:9531/buscenter/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank')
let myPopup = window.open('http://anrui.yyundong.com/buscenter/#/' + '?token=' + getStorage(), '_blank') let myPopup = window.open('http://anrui.yyundong.com/buscenter/#/' + '?token=' + getStorage(), '_blank')
// let myPopup = window.open('http://120.46.172.184/buscenter/#/' + '?token=' + getStorage(), '_blank') // let myPopup = window.open('http://120.46.172.184/buscenter/#/' + '?token=' + getStorage(), '_blank')
} }
@ -592,4 +620,12 @@ p {
font-size: 14px !important; font-size: 14px !important;
} }
} }
.selectStyle {
::v-deep .el-input__inner {
border: 0px !important;
background-color: #0294d7 !important;
font-size: 17px;
color: #FFFFFF;
}
}
</style> </style>

38
anrui-system-ui/src/views/organizationManage/organizationManage.vue

@ -34,9 +34,11 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td>组织简称</td> <td>主管人员</td>
<td> <td>
<el-input v-model="form.orgAbbre" style="width: 30%"></el-input> <el-select v-model="form.zgStaffSid" style="width:300px" filterable>
<el-option v-for="item in staffdata" :key="item.sid" :label="item.name" :value="item.sid"/>
</el-select>
</td> </td>
<td>分管人员</td> <td>分管人员</td>
<td> <td>
@ -45,6 +47,12 @@
</el-select> </el-select>
</td> </td>
</tr> </tr>
<tr>
<td>组织简称</td>
<td :colspan="3">
<el-input v-model="form.orgAbbre" style="width: 30%"></el-input>
</td>
</tr>
<tr> <tr>
<td>管理层级</td> <td>管理层级</td>
<td> <td>
@ -200,9 +208,11 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td>组织简称</td> <td>主管人员</td>
<td> <td>
<el-input v-model="form.orgAbbre" style="width: 300px"></el-input> <el-select v-model="form.zgStaffSid" style="width:300px" filterable>
<el-option v-for="item in staffdata" :key="item.sid" :label="item.name" :value="item.sid"/>
</el-select>
</td> </td>
<td>分管人员</td> <td>分管人员</td>
<td> <td>
@ -211,6 +221,12 @@
</el-select> </el-select>
</td> </td>
</tr> </tr>
<tr>
<td>组织简称</td>
<td :colspan="3">
<el-input v-model="form.orgAbbre" style="width: 300px"></el-input>
</td>
</tr>
<tr> <tr>
<td>管理层级</td> <td>管理层级</td>
<td> <td>
@ -268,7 +284,7 @@
import { import {
addOrgTree, addOrgTree,
delOrgtree, delOrgtree,
getQrCode, getQrCode, getStaff,
getStaffName, getStaffName,
orgList, orgList,
pageList, pageList,
@ -339,6 +355,7 @@ export default {
}, },
tableData: [], tableData: [],
treedata: [], treedata: [],
staffdata: [],
staffdata2: [], staffdata2: [],
rules: {} rules: {}
} }
@ -455,9 +472,11 @@ export default {
this.form.organizationSid = this.$store.getters.userInfo.orgSid this.form.organizationSid = this.$store.getters.userInfo.orgSid
this.form.address = data.orgAddress || data.address this.form.address = data.orgAddress || data.address
this.form.dlxx = data.gisInfo || data.dlxx this.form.dlxx = data.gisInfo || data.dlxx
this.getStaff(data.sid)
this.getStaff2(data.sid) this.getStaff2(data.sid)
}, },
editRow(row) { editRow(row) {
this.getStaff(row.sid)
this.getStaff2(row.sid) this.getStaff2(row.sid)
this.dialogTitle = '编辑' this.dialogTitle = '编辑'
this.isshow = 'edit' this.isshow = 'edit'
@ -477,6 +496,7 @@ export default {
}) })
}, },
deit(data) { // deit(data) { //
this.getStaff(data.sid)
this.getStaff2(data.sid) this.getStaff2(data.sid)
console.log(data, 8888) console.log(data, 8888)
this.dialogVisible = true this.dialogVisible = true
@ -542,6 +562,14 @@ export default {
this.page.params.name = '' this.page.params.name = ''
this.getPageList(this.page) this.getPageList(this.page)
}, },
//
getStaff(orgSid) {
getStaff({ deptSid: orgSid }).then((res) => {
if (res.success) {
this.staffdata = res.data
}
})
},
// //
getStaff2(orgSid) { getStaff2(orgSid) {
getStaffName({ deptSid: orgSid }).then(res => { getStaffName({ deptSid: orgSid }).then(res => {

Loading…
Cancel
Save