Browse Source

Merge remote-tracking branch 'origin/master'

master
yxt_djz 3 years ago
parent
commit
60b4fc9e59
  1. 2
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/commoncontract/CommonContract.java
  2. 2
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/commoncontract/CommonContractBuscenterVo.java
  3. 102
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractService.java
  4. 2
      anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java
  5. 2
      anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysstaffinfo/SysStaffinfoFeign.java
  6. 2
      anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysstaffinfo/SysStaffinfoFeignFallback.java
  7. 4
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationRest.java
  8. 2
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationService.java
  9. 4
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysrole/SysRoleMapper.java
  10. 13
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysrole/SysRoleMapper.xml
  11. 21
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysrole/SysRoleService.java
  12. 130
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstaffinfo/SysStaffinfoMapper.xml
  13. 4
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstaffinfo/SysStaffinfoRest.java
  14. 7
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstaffinfo/SysStaffinfoService.java
  15. 3
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgMapper.java
  16. 4
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgService.java
  17. 17
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserService.java
  18. 4
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclegression/AppScmVehicleGressionDetailsVo.java
  19. 26
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclegression/AppScmVehicleGressionDto.java
  20. 4
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclegression/AppScmVehicleGressionInfoVo.java
  21. 12
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclegressionveh/ScmVehicleGressionVehDto.java
  22. 132
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclegression/ScmVehicleGressionService.java
  23. 2
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclegressionveh/ScmVehicleGressionVehMapper.java
  24. 18
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclegressionveh/ScmVehicleGressionVehService.java
  25. 137
      anrui-scm/anrui-scm-ui/src/api/specialrebate/specialrebatecheck.js
  26. 73
      anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js
  27. 172
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/relation/specialrebatetobecheckedAdd.vue
  28. 130
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/relation/specialrebatetobecheckedInfo.vue
  29. 331
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/relation/yiheduizhuanxiangfanli.vue
  30. 365
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/specialrebatecheck.vue
  31. 564
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/specialrebatecheckAdd.vue
  32. 206
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/specialrebatecheckInfo.vue
  33. 675
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/specialrebatetobechecked.vue
  34. 172
      anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliheduiFlow/relation/specialrebatetobecheckedAdd.vue
  35. 130
      anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliheduiFlow/relation/specialrebatetobecheckedInfo.vue
  36. 330
      anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliheduiFlow/relation/yiheduizhuanxiangfanli.vue
  37. 400
      anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliheduiFlow/zhuanxiangfanliheduiDaiBanInfo.vue
  38. 546
      anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliheduiFlow/zhuanxiangfanliheduiEdit.vue
  39. 276
      anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliheduiFlow/zhuanxiangfanliheduiYiBanInfo.vue
  40. 12
      anrui-system-ui/src/views/organizationManage/organizationManage.vue
  41. 3
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/scmvehiclegression/AppGressionDetailsVo.java
  42. 55
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/scmvehiclegression/AppGressionDto.java
  43. 3
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/scmvehiclegression/AppGressionInfoVo.java
  44. 26
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/scmvehiclegression/VehicleGressionVehDto.java
  45. 27
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/scmvehiclegression/VehicleGressionVehVo.java

2
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/commoncontract/CommonContract.java

@ -111,4 +111,6 @@ public class CommonContract extends BaseEntity {
private String taskId;
@ApiModelProperty("生成的合同的url")
private String commonContractUrl;
private String configSid;
}

2
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/commoncontract/CommonContractBuscenterVo.java

@ -88,4 +88,6 @@ public class CommonContractBuscenterVo implements Vo {
@ApiModelProperty("附件文件")
private List<CommonAppendixVo> pcCommonAppendixDtoList;
private String commonContractUrl;
}

102
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractService.java

@ -1372,52 +1372,62 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp
}
}
//生成合同数据
String finalUrl = url;
Future<String> future3 = pool.submit(() -> {
//新增合同信息
CommonContract commonContract = new CommonContract();
//合同编号
commonContract.setContractNo(contractNo);
//合同类型
if("现车".equals(appOrderDetailsVo.getOrderType())){
commonContract.setContractTypeKey(CommonContractEnum.contractType.XC_CONTRACT.getCode());
commonContract.setContractType(CommonContractEnum.contractType.XC_CONTRACT.getRemarks());
}else{
commonContract.setContractTypeKey(CommonContractEnum.contractType.DC_CONTRACT.getCode());
commonContract.setContractType(CommonContractEnum.contractType.DC_CONTRACT.getRemarks());
}
//客户sid
commonContract.setCustomerSid(appOrderDetailsVo.getCustomerSid());
//业务员sid、业务员
commonContract.setStaffSid(appOrderDetailsVo.getUserSid());
commonContract.setStaffName(appOrderDetailsVo.getSellerName());
//分公司sid
commonContract.setOrgSid(appOrderDetailsVo.getOrgSid());
//业务表sid
commonContract.setBusSid(dto.getBusSid());
//甲方名称、乙方名称、其他方名称、
commonContract.setPartyA(createOrgName);
commonContract.setPartyB(customerName);
//签订日期、签订地点
//订金、合同金额
commonContract.setDeposit(new BigDecimal(depositTotal));
commonContract.setContractAmount(depositTotal);
//合同附件
//身份证信息附件
//车型sid
commonContract.setModelSid(appOrderModelInfoVo.getModelSid());
//车型名称
commonContract.setModelName(appOrderModelInfoVo.getModelName());
//车辆台数
commonContract.setNum(Integer.valueOf(num).intValue());
//车辆单价
commonContract.setPrice(new BigDecimal(transactionPrice));
//单台订金
commonContract.setOneDeposit(new BigDecimal(depositInfo.getDeposit()));
commonContract.setCommonContractUrl(finalUrl);
save(commonContract);
return commonContract.getSid();
});
//根据销售订单sid查询合同表中是否存在
CommonContractBuscenterVo commonContractBuscenterVo = baseMapper.selectByBusSid(dto.getBusSid());
if (commonContractBuscenterVo == null) {
String finalUrl = url;
Future<String> future3 = pool.submit(() -> {
//新增合同信息
CommonContract commonContract = new CommonContract();
//合同编号
commonContract.setContractNo(contractNo);
//合同类型
if ("现车".equals(appOrderDetailsVo.getOrderType())) {
commonContract.setContractTypeKey(CommonContractEnum.contractType.XC_CONTRACT.getCode());
commonContract.setContractType(CommonContractEnum.contractType.XC_CONTRACT.getRemarks());
} else {
commonContract.setContractTypeKey(CommonContractEnum.contractType.DC_CONTRACT.getCode());
commonContract.setContractType(CommonContractEnum.contractType.DC_CONTRACT.getRemarks());
}
//客户sid
commonContract.setCustomerSid(appOrderDetailsVo.getCustomerSid());
//业务员sid、业务员
commonContract.setStaffSid(appOrderDetailsVo.getUserSid());
commonContract.setStaffName(appOrderDetailsVo.getSellerName());
//分公司sid
commonContract.setOrgSid(appOrderDetailsVo.getOrgSid());
//业务表sid
commonContract.setBusSid(dto.getBusSid());
//甲方名称、乙方名称、其他方名称、
commonContract.setPartyA(createOrgName);
commonContract.setPartyB(customerName);
//签订日期、签订地点
commonContract.setCreateDate(new Date());
commonContract.setAddress("");
//订金
commonContract.setDeposit(new BigDecimal(depositTotal));
//合同金额
commonContract.setContractAmount(depositTotal);
//合同附件
//身份证信息附件
//车型sid
commonContract.setModelSid(appOrderModelInfoVo.getModelSid());
//车型名称
commonContract.setModelName(appOrderModelInfoVo.getModelName());
commonContract.setConfigSid(appOrderModelInfoVo.getConfigSid());
//车辆台数
commonContract.setNum(Integer.valueOf(num).intValue());
//车辆单价
commonContract.setPrice(new BigDecimal(transactionPrice));
//单台订金
commonContract.setOneDeposit(new BigDecimal(depositInfo.getDeposit()));
commonContract.setCommonContractUrl(finalUrl);
save(commonContract);
return commonContract.getSid();
});
}
} catch (Exception e) {
e.printStackTrace();
return rb.setMsg("生成文件失败");

2
anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java

@ -25,7 +25,7 @@ public enum ProcDefEnum {
BASEOUTSOURCINGAPPLICATION("外采申请", "process_5tqysnjc:4:495004"),//TODO
BASEMODELMODPRICE("车型调价申请", "process_kydcif7k:6:505004"),
BASEINTERNALPURCHASE("调车申请", "process_i6luw5xq:1:497508"),
SCMCARTRANSFER("库存地点变更申请", "process_3bc4p2em:7:515004"), //TODO
SCMCARTRANSFER("库存地点变更申请", "process_3bc4p2em:6:510004"), //TODO
FINCOSTAPPLY("费用申请","process_u0pahv0s:5:457512"),
FINPAYAPPLY("付款申请","process_gin2tntb:3:457508"),
BUSDELIVEREDAPPLY("出库申请","process_wgt1n66l:2:357504"),

2
anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysstaffinfo/SysStaffinfoFeign.java

@ -94,7 +94,7 @@ public interface SysStaffinfoFeign {
*/
@ApiOperation("获取集团内全部员工姓名")
@GetMapping("/getStaffName")
public ResultBean<List<Map<String, String>>> getStaffName(@RequestParam(value = "staffName", required = false) String staffName);
public ResultBean<List<Map<String, String>>> getStaffName(@RequestParam(value = "staffName", required = false) String staffName,@RequestParam(value = "deptSid") String deptSid);
/**
* 获取部门内全部员工姓名

2
anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysstaffinfo/SysStaffinfoFeignFallback.java

@ -54,7 +54,7 @@ public class SysStaffinfoFeignFallback implements SysStaffinfoFeign {
}
@Override
public ResultBean<List<Map<String, String>>> getStaffName(String staffName) {
public ResultBean<List<Map<String, String>>> getStaffName(String staffName,String deptSid) {
return null;
}

4
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationRest.java

@ -118,12 +118,12 @@ public class SysOrganizationRest implements SysOrganizationFeign {
}
//删除关联关系中的所有主管与分管的人员关系
sysStaffOrgService.delZGAndFGByOrgSid(sid);
if (StringUtils.isNotBlank(zgStaffSid)) {
/*if (StringUtils.isNotBlank(zgStaffSid)) {
ResultBean resultBean = sysOrganizationService.addSysStaffOrg(zgStaffSid, "1", sysOrganization);
if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg());
}
}
}*/
if (StringUtils.isNotBlank(fgStaffSid)) {
ResultBean resultBean = sysOrganizationService.addSysStaffOrg(fgStaffSid, "2", sysOrganization);
if (!resultBean.getSuccess()) {

2
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationService.java

@ -167,7 +167,7 @@ public class SysOrganizationService extends MybatisBaseService<SysOrganizationMa
int count = sysStaffOrgService.selectByStaffAndOrg(entity.getOrgSidPath(), sid, "3");
SysStaffinfo sysStaffinfo = sysStaffInfoService.fetchBySid(sid);
if(count>0){
return rb.setMsg(sysStaffinfo.getName()+"已在本部门");
return rb.setMsg(sysStaffinfo.getName()+"已在本部门,不能设置分管");
}
}

4
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysrole/SysRoleMapper.java

@ -55,4 +55,8 @@ public interface SysRoleMapper extends BaseMapper<SysRole> {
String getLevelType(String roleSid);
String selectRoleSid(String userRoleSid);
String selectByUserSid(String sid);
List<String> selectByUser(String userSid);
}

13
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysrole/SysRoleMapper.xml

@ -77,4 +77,17 @@
left join sys_role ssr on ssp.sid = ssr.postSid
where sr.sid = #{sid}
</select>
<select id="selectByUserSid" resultType="java.lang.String">
select GROUP_CONCAT(sr.name SEPARATOR '|') as roleName
from sys_user_role sur
left join sys_role sr on sur.roleSid = sr.sid
where sur.userSid = #{sid}
</select>
<select id="selectByUser" resultType="java.lang.String">
select roleSid
from sys_user_role
where userSid = #{userSid}
</select>
</mapper>

21
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysrole/SysRoleService.java

@ -3,18 +3,15 @@ package com.yxt.anrui.portal.biz.sysrole;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.commons.lang3.StringUtils;
import com.yxt.anrui.portal.api.sysrole.SysRole;
import com.yxt.anrui.portal.api.sysrole.SysRoleDto;
import com.yxt.anrui.portal.api.sysrole.SysRoleQuery;
import com.yxt.anrui.portal.api.sysrole.SysRoleVo;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import com.yxt.anrui.portal.api.sysrole.SysRole;
import com.yxt.anrui.portal.api.sysrole.SysRoleQuery;
import com.yxt.anrui.portal.api.sysrole.SysRoleVo;
import com.yxt.anrui.portal.api.sysrole.SysRoleDto;
import com.yxt.anrui.portal.api.sysrole.SysRoleFeign;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
@ -157,4 +154,12 @@ public class SysRoleService extends MybatisBaseService<SysRoleMapper, SysRole> {
public String selectRoleSid(String userRoleSid) {
return baseMapper.selectRoleSid(userRoleSid);
}
public String selectByUserSid(String sid) {
return baseMapper.selectByUserSid(sid);
}
public List<String> selectByUser(String userSid) {
return baseMapper.selectByUser(userSid);
}
}

130
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstaffinfo/SysStaffinfoMapper.xml

@ -9,21 +9,21 @@
SELECT staff.sid, staff.name, staff.mobile, staff.pinYinName, staff.firstPinYinLabel, user.headImage
FROM sys_staffinfo staff
LEFT JOIN sys_user user
ON staff.sid = user.staffSid
ON staff.sid = user.staffSid
ORDER BY staff.firstPinYinLabel = '#', staff.firstPinYinLabel ASC, staff.pinYinName
</select>
<select id="searchAppContactsPageList"
resultType="com.yxt.anrui.portal.api.sysstaffinfo.SysStaffinfoAppContactsSearchVo">
SELECT staff.sid,
staff.name,
staff.mobile,
staff.position,
user.headImage,
GROUP_CONCAT(org.orgName SEPARATOR '/') orgName
staff.name,
staff.mobile,
staff.position,
user.headImage,
GROUP_CONCAT(org.orgName SEPARATOR '/') orgName
FROM sys_staffinfo staff
LEFT JOIN sys_staff_org org ON org.staffSid = staff.sid
LEFT JOIN sys_user user ON staff.sid = user.staffSid
LEFT JOIN sys_staff_org org ON org.staffSid = staff.sid
LEFT JOIN sys_user user ON staff.sid = user.staffSid
WHERE 1 = 1
<if test="mobileStr != null and mobileStr != ''">
AND staff.mobile LIKE concat('%', #{mobileStr}, '%')
@ -49,8 +49,8 @@
GROUP_CONCAT(org.orgNamePath SEPARATOR '/') orgNamePath
FROM sys_staffinfo staff
LEFT JOIN sys_user user
ON staff.sid = user.staffSid
LEFT JOIN sys_staff_org org ON staff.sid = org.staffSid
ON staff.sid = user.staffSid
LEFT JOIN sys_staff_org org ON staff.sid = org.staffSid
WHERE staff.sid = #{staffSid}
GROUP BY staff.sid
</select>
@ -68,14 +68,15 @@
FROM sys_staff_org org
INNER JOIN sys_staffinfo staff ON org.staffSid = staff.sid
LEFT JOIN sys_user user
ON staff.sid = user.staffSid
ON staff.sid = user.staffSid
WHERE org.orgSid = #{sid}
</select>
<!--根据员工类型key查询员工工号的最大号-->
<select id="selectJobNumber" resultType="com.yxt.anrui.portal.api.sysstaffinfo.SysStaffinfo">
select *
from sys_staffinfo
order by jobNumber desc limit 1
order by jobNumber desc
limit 1
</select>
<!--根据手机号查询员工是否重复-->
<select id="selectByMobile" resultType="com.yxt.anrui.portal.api.sysstaffinfo.SysStaffinfo">
@ -104,24 +105,24 @@
DATE_FORMAT(si.joinCompnyDate, '%Y-%m-%d') AS joinCompnyDate,
<!--所在部门-->
(select GROUP_CONCAT(orgName SEPARATOR ',') orgName from sys_staff_org so where so.staffSid = si.sid) as
orgName,
orgName,
<!--所在部门sid-->
(select GROUP_CONCAT(orgSid SEPARATOR ',') orgSid from sys_staff_org so where so.staffSid = si.sid) as
orgSid,
orgSid,
<!--岗位-->
(select GROUP_CONCAT(sp.name SEPARATOR ',') postName
from sys_staff_post ssp
left join sys_post sp on
sp.sid =
ssp.postSid
where ssp.staffSid = si.sid
group by ssp.id) as postName
from sys_staff_post ssp
left join sys_post sp on
sp.sid =
ssp.postSid
where ssp.staffSid = si.sid
group by ssp.id) as postName
from sys_staffinfo si
LEFT JOIN sys_staff_org so
ON so.staffSid = si.sid
LEFT JOIN sys_staff_post ssp
ON ssp.staffSid = si.sid
${ew.customSqlSegment}
LEFT JOIN sys_staff_org so
ON so.staffSid = si.sid
LEFT JOIN sys_staff_post ssp
ON ssp.staffSid = si.sid
${ew.customSqlSegment}
</select>
<!--根据员工手机号和sid查询员工信息是否已存在-->
<select id="selectByMobileAndSid" resultType="com.yxt.anrui.portal.api.sysstaffinfo.SysStaffinfo">
@ -249,8 +250,8 @@
isHaveInsurance,
<!--意外险参保:1是,0否-->
case isHaveInsurance
when 1 then '是'
when 0 then '否' end as isHaveInsuranceValue,
when 1 then '是'
when 0 then '否' end as isHaveInsuranceValue,
<!--意外险参保时间-->
DATE_FORMAT(insuranceStartDate, '%Y-%m-%d') as insuranceStartDate,
<!--意外险参保终止日期-->
@ -261,26 +262,26 @@
isHaveAged,
<!--养老:1是,0否-->
case isHaveAged
when 1 then '是'
when 0 then '否' end as isHaveAgedValue,
when 1 then '是'
when 0 then '否' end as isHaveAgedValue,
<!--医疗:1是,0否-->
isHaveMedical,
<!--医疗:1是,0否-->
case isHaveMedical
when 1 then '是'
when 0 then '否' end as isHaveMedicalValue,
when 1 then '是'
when 0 then '否' end as isHaveMedicalValue,
<!--工伤:1是,0否-->
isHaveInjury,
<!--工伤:1是,0否-->
case isHaveInjury
when 1 then '是'
when 0 then '否' end as isHaveInjuryValue,
when 1 then '是'
when 0 then '否' end as isHaveInjuryValue,
<!--失业:1是,0否-->
isHaveUnemploy,
<!--失业:1是,0否-->
case isHaveUnemploy
when 1 then '是'
when 0 then '否' end as isHaveUnemployValue,
when 1 then '是'
when 0 then '否' end as isHaveUnemployValue,
<!--社保参保地-->
insuredPlace,
<!--纸质档案保管地-->
@ -314,8 +315,11 @@
</select>
<select id="getStaffName" resultType="java.util.Map">
SELECT sid, name
FROM sys_staffinfo ${ew.customSqlSegment}
SELECT DISTINCT ss.sid, ss.name
FROM sys_staffinfo ss
LEFT JOIN sys_staff_org sso
ON ss.`sid` = sso.`staffSid`
${ew.customSqlSegment}
</select>
<select id="getStaffNameByDeptSid" resultType="java.util.Map">
@ -328,46 +332,46 @@
</select>
<select id="getUserList" resultType="com.yxt.anrui.portal.api.sysstaffinfo.app.AppSysStaffVo">
select su.sid userSid,
si.name userName,
su.headImage,
si.mobile userMobile,
sso.orgName as department,
sp.name
select su.sid userSid,
si.name userName,
su.headImage,
si.mobile userMobile,
sso.orgName as department,
sp.name
from sys_staff_org sso
left join sys_staffinfo si on sso.staffSid = si.sid
left join sys_user su on si.sid = su.staffSid
left join sys_staff_post ssp on si.sid = ssp.staffSid
left join sys_post sp on sp.sid = ssp.postSid
left join sys_staffinfo si on sso.staffSid = si.sid
left join sys_user su on si.sid = su.staffSid
left join sys_staff_post ssp on si.sid = ssp.staffSid
left join sys_post sp on sp.sid = ssp.postSid
<where>
${ew.sqlSegment}
<if test="orgSid != null and orgSid != ''">
and find_in_set(#{orgSid}
, replace (sso.orgSidPath
, '/'
, ','))
, replace (sso.orgSidPath
, '/'
, ','))
</if>
</where>
</select>
<select id="getGressionUserList" resultType="com.yxt.anrui.portal.api.sysstaffinfo.app.AppSysStaffVo">
select su.sid as userSid,
si.name as userName,
su.headImage,
si.mobile as userMobile,
sso.orgName as department,
sp.name
select su.sid as userSid,
si.name as userName,
su.headImage,
si.mobile as userMobile,
sso.orgName as department,
sp.name
from sys_staff_org sso
left join sys_staffinfo si on sso.staffSid = si.sid
left join sys_user su on si.sid = su.staffSid
left join sys_staff_post ssp on si.sid = ssp.staffSid
left join sys_post sp on sp.sid = ssp.postSid
left join sys_staffinfo si on sso.staffSid = si.sid
left join sys_user su on si.sid = su.staffSid
left join sys_staff_post ssp on si.sid = ssp.staffSid
left join sys_post sp on sp.sid = ssp.postSid
<where>
<if test="userOrgSid != null and userOrgSid != ''">
and find_in_set(#{userOrgSid}
, replace (sso.orgSidPath
, '/'
, ','))
, replace(sso.orgSidPath
, '/'
, ','))
</if>
</where>
</select>

4
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstaffinfo/SysStaffinfoRest.java

@ -135,9 +135,9 @@ public class SysStaffinfoRest implements SysStaffinfoFeign {
}
@Override
public ResultBean<List<Map<String, String>>> getStaffName(String staffName) {
public ResultBean<List<Map<String, String>>> getStaffName(String staffName,String deptSid) {
ResultBean rb = ResultBean.fireFail();
List<Map<String, String>> staffNameList = sysStaffinfoService.getStaffName(staffName);
List<Map<String, String>> staffNameList = sysStaffinfoService.getStaffName(staffName,deptSid);
return rb.success().setData(staffNameList);
}

7
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstaffinfo/SysStaffinfoService.java

@ -605,12 +605,13 @@ public class SysStaffinfoService extends MybatisBaseService<SysStaffinfoMapper,
return rb.success().setData(list);
}
public List<Map<String, String>> getStaffName(String staffName) {
public List<Map<String, String>> getStaffName(String staffName,String deptSid) {
QueryWrapper<Map<String, Object>> qw = new QueryWrapper<>();
if (StringUtils.isNotBlank(staffName)) {
qw.like("name", staffName);
qw.like("ss.name", staffName);
}
qw.eq("isDelete", 0);
qw.eq("ss.isDelete", 0);
qw.ne("sso.orgSid", deptSid);
return baseMapper.getStaffName(qw);
}

3
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgMapper.java

@ -54,6 +54,9 @@ public interface SysStaffOrgMapper extends BaseMapper<SysStaffOrg> {
@Select("select * from sys_staff_org where staffSid=#{staffSid}")
List<SysStaffOrgVo> getSysStaffOrgListByStaffSid(@Param("staffSid") String staffSid);
@Select("select * from sys_staff_org where staffSid=#{staffSid} and manageType = '3'")
List<SysStaffOrgVo> getSysStaffOrgListByStaff(@Param("staffSid") String staffSid);
/**
* 根据员工sid更新员工信息
*

4
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgService.java

@ -164,6 +164,10 @@ public class SysStaffOrgService extends MybatisBaseService<SysStaffOrgMapper, Sy
return baseMapper.getSysStaffOrgListByStaffSid(staffSid);
}
public List<SysStaffOrgVo> getSysStaffOrgListByStaff(String staffSid) {
return baseMapper.getSysStaffOrgListByStaff(staffSid);
}
public String getSysStaffOrgSidListByStaffSid(String staffSid) {
return baseMapper.getSysStaffOrgSidListByStaffSid(staffSid);
}

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

@ -8,7 +8,6 @@ import com.yxt.anrui.crm.api.crmcustomer.CrmCustomer;
import com.yxt.anrui.crm.api.crmcustomer.CrmCustomerFeign;
import com.yxt.anrui.portal.api.sms.SmsFeign;
import com.yxt.anrui.portal.api.sysorganization.SysOrganization;
import com.yxt.anrui.portal.api.sysrole.SysRoleQuery;
import com.yxt.anrui.portal.api.sysstaffinfo.SysStaffinfo;
import com.yxt.anrui.portal.api.sysstaffinfo.SysStaffinfoVo;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg;
@ -327,7 +326,7 @@ public class SysUserService extends MybatisBaseService<SysUserMapper, SysUser> {
} else {
userInfoOneVo.setOrganizationName("无单位");
userInfoOneVo.setDepartmentName("无部门");
List<SysStaffOrgVo> orgVoList = sysStaffOrgService.getSysStaffOrgListByStaffSid(user.getStaffSid());
List<SysStaffOrgVo> orgVoList = sysStaffOrgService.getSysStaffOrgListByStaff(user.getStaffSid());
SysStaffPostDetailsVo staffPostDetailsVo = sysStaffPostService.getPostByStaffSid(user.getStaffSid());
userInfoOneVo.setPostSid(staffPostDetailsVo.getPostSid());
userInfoOneVo.setPostName(staffPostDetailsVo.getName());
@ -337,7 +336,8 @@ public class SysUserService extends MybatisBaseService<SysUserMapper, SysUser> {
userInfoOneVo.setDepartmentSid(sysStaffOrgVo.getOrgSid());
String psid = sysOrganizationService.fetchBySid(sysStaffOrgVo.getOrgSid()).getPsid();
String name = sysOrganizationService.fetchBySid(psid).getName();
userInfoOneVo.setPNameAndDepartmentNameAndPostName(name + "-" + sysStaffOrgVo.getOrgName() + " " + userInfoOneVo.getPostName());
// userInfoOneVo.setPNameAndDepartmentNameAndPostName(name + "-" + sysStaffOrgVo.getOrgName() + " " + userInfoOneVo.getPostName());
userInfoOneVo.setPNameAndDepartmentNameAndPostName(name + "-" + sysStaffOrgVo.getOrgName());
userInfoOneVo.setOrganizationSid(sysStaffOrgVo.getOrgSid());
userInfoOneVo.setOrganizationName(sysStaffOrgVo.getOrgName());
userInfoOneVo.setOrgNamePath(sysStaffOrg.getOrgNamePath());
@ -348,8 +348,8 @@ public class SysUserService extends MybatisBaseService<SysUserMapper, SysUser> {
// 设置用户的角色sids
List<String> roleSids = this.getUserRoleSids(user.getSid());
userInfoOneVo.setRoleSids(roleSids);
if (userInfoOneVo.getRoleSids().contains("000003") || userInfoOneVo.getRoleSids().contains("000004")) {
}
String roleName = sysRoleService.selectByUserSid(user.getSid());
userInfoOneVo.setRoleName(roleName);
return userInfoOneVo;
}
@ -385,12 +385,7 @@ public class SysUserService extends MybatisBaseService<SysUserMapper, SysUser> {
* @return
*/
public List<String> getUserRoleSids(String userSid) {
List<String> list = new ArrayList<>();
List<String> orgTypeKeys = new ArrayList<>();
SysRoleQuery roleQuery = new SysRoleQuery();
//用户类别来区分是系统管理、单位管理员1、单位一般用户2、尚无单位用户
roleQuery.setType(1);
return list;
return sysRoleService.selectByUser(userSid);
}
public SysUser fetchByUserName(String mobile) {

4
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclegression/AppScmVehicleGressionDetailsVo.java

@ -26,6 +26,7 @@
package com.yxt.anrui.scm.api.scmvehiclegression;
import com.yxt.anrui.scm.api.scmvehiclegressionveh.ScmVehicleGressionVehVo;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -123,4 +124,7 @@ public class AppScmVehicleGressionDetailsVo implements Vo {
@ApiModelProperty("调出方负责人用户sid")
private String personUserSid;
@ApiModelProperty("车架号")
private List<ScmVehicleGressionVehVo> scmVehicleGressionVehs;
}

26
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclegression/AppScmVehicleGressionDto.java

@ -27,6 +27,7 @@ package com.yxt.anrui.scm.api.scmvehiclegression;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.yxt.anrui.scm.api.scmvehiclegressionveh.ScmVehicleGressionVehDto;
import com.yxt.common.core.dto.Dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -55,15 +56,15 @@ public class AppScmVehicleGressionDto implements Dto {
private static final long serialVersionUID = -5753948406322577902L;
private String sid;
private String userSid;
@ApiModelProperty("车辆sid")
private String vehicleSid;
@ApiModelProperty("车架号")
private String vinNo;
@ApiModelProperty("车架号")
private List<String> vins;
// @ApiModelProperty("车辆sid")
// private String vehicleSid;
// @ApiModelProperty("车架号")
// private String vinNo;
// @ApiModelProperty("车架号")
// private List<String> vins;
@ApiModelProperty("申请编号")
private String applicantNo;
// @ApiModelProperty("申请人")
// @ApiModelProperty("申请人")
// private String applicantName;
// @ApiModelProperty("申请日期")
// private String applicantDate;
@ -98,10 +99,13 @@ public class AppScmVehicleGressionDto implements Dto {
private String proCardState;
@ApiModelProperty("临牌状态")
private String proCardStateKey;
@ApiModelProperty("临牌")
private String temporaryCard;
@ApiModelProperty("保单照片")
private List<String> policyImage;
// @ApiModelProperty("临牌")
// private String temporaryCard;
// @ApiModelProperty("保单照片")
// private List<String> policyImage;
@ApiModelProperty("车架号")
private List<ScmVehicleGressionVehDto> scmVehicleGressionVehs;
@ApiModelProperty("调出方负责人名称")
private String staffName;

4
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclegression/AppScmVehicleGressionInfoVo.java

@ -27,6 +27,7 @@ package com.yxt.anrui.scm.api.scmvehiclegression;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.yxt.anrui.scm.api.scmvehiclegressionveh.ScmVehicleGressionVehVo;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -106,6 +107,9 @@ public class AppScmVehicleGressionInfoVo implements Vo {
@ApiModelProperty("流程实例id")
private String procInstId;
@ApiModelProperty("车架号")
private List<ScmVehicleGressionVehVo> scmVehicleGressionVehs;
@ApiModelProperty("保单照片")
private List<String> policyImage;
@ApiModelProperty("现场照片")

12
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclegressionveh/ScmVehicleGressionVehDto.java

@ -51,17 +51,17 @@ public class ScmVehicleGressionVehDto implements Dto {
private String sid; // sid
@ApiModelProperty("移位申请单sid")
@ApiModelProperty("移位申请单sid")
private String mainSid; // 移位申请单sid
@ApiModelProperty("车辆sid")
@ApiModelProperty("车辆sid")
private String vehSid; // 车辆sid
@ApiModelProperty("车架号")
@ApiModelProperty("车架号")
private String vehVin; // 车架号
@ApiModelProperty("买断状态key")
@ApiModelProperty("买断状态key")
private String settlementStatus; // 买断状态key
@ApiModelProperty("买断状态value")
@ApiModelProperty("买断状态value")
private String settlementStatusValue; // 买断状态value
@ApiModelProperty("临时牌照号码")
@ApiModelProperty("临时牌照号码")
private String temporaryCardNo; // 临时牌照号码
}

132
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclegression/ScmVehicleGressionService.java

@ -65,6 +65,8 @@ import com.yxt.anrui.scm.api.scmvehiclegression.flowable.GetNodeVo;
import com.yxt.anrui.scm.api.scmvehiclegression.flowable.ScmCarTransferTaskQuery;
import com.yxt.anrui.scm.api.scmvehiclegression.flowable.SubmitCarTransferDto;
import com.yxt.anrui.scm.api.scmvehiclegressionveh.ScmVehicleGressionVeh;
import com.yxt.anrui.scm.api.scmvehiclegressionveh.ScmVehicleGressionVehDto;
import com.yxt.anrui.scm.api.scmvehiclegressionveh.ScmVehicleGressionVehVo;
import com.yxt.anrui.scm.biz.scmexitpermit.ScmExitPermitService;
import com.yxt.anrui.scm.biz.scmfile.ScmFileService;
import com.yxt.anrui.scm.biz.scmvehiclegressionveh.ScmVehicleGressionVehService;
@ -370,7 +372,8 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
@Transactional(rollbackFor = Exception.class)
public ResultBean saveCarTransferInfo(AppScmVehicleGressionDto dto) {
ResultBean rb = ResultBean.fireFail();
if (dto.getVins() == null) {
List<ScmVehicleGressionVehDto> scmVehicleGressionVehDtos = dto.getScmVehicleGressionVehs();
if (scmVehicleGressionVehDtos == null) {
return rb.setMsg("请选择车架号!");
}
if (dto.getLocationSid().equals(dto.getTargetLocationSid())) {
@ -384,6 +387,7 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
}
String s1 = "";
String type = "04";
String vinNo = "";
String userSid = dto.getUserSid();
String useOrgSid = sysStaffOrgFeign.getPathSidByUserSid(userSid).getData();
AppUserOrgInfoVo data = sysUserFeign.getUserOrgInfoByUserSid(userSid).getData();
@ -403,47 +407,17 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
// Map<String, String> stringStringMap = generateBillNo(userSid);
String billNo = getApplyCode(dto);
scmVehicleGression.setApplicantNo(billNo);
// if ("1".equals(dto.getProCardStateKey())) {
// scmVehicleGression.setTemporaryCard(dto.getTemporaryCard());
// } else if ("0".equals(dto.getProCardStateKey())) {
// scmVehicleGression.setTemporaryCard("");
// }
// if ("1".equals(dto.getInsuranceStateKey())) { // 如果保单状态为否 不保存保单照片
// List<String> factoryImage = dto.getPolicyImage();
// if (factoryImage.size() <= 0) {
// return rb.setMsg("保单照片不能为空");
// }
// scmFileService.deleteByLinkSidAndType(scmVehicleGression.getSid(), type);
// for (String s : factoryImage) {
// if (s.contains(fileUploadComponent.getUrlPrefix())) {
// s1 = s.replace(fileUploadComponent.getUrlPrefix(), "");
// }
// ScmFile scmFile = new ScmFile();
// scmFile.setAttachType(type);
// scmFile.setFileName("保单照片");
// scmFile.setFilePath(s1);
// scmFile.setLinkSid(scmVehicleGression.getSid());
// scmFileService.save(scmFile);
// }
// } else if ("0".equals(dto.getInsuranceStateKey())) {
// scmFileService.deleteByLinkSidAndType(scmVehicleGression.getSid(), type);
// }
save(scmVehicleGression);
//存放车架号
List<String> vins = dto.getVins();
if (vins != null) {
for (String vin : vins) {
ScmVehicleGressionVeh scmVehicleGressionVeh = new ScmVehicleGressionVeh();
scmVehicleGressionVeh.setMainSid(scmVehicleGression.getSid());
scmVehicleGressionVeh.setVehVin(vin);
BaseVehicleVo baseVehicleVo = baseVehicleFeign.selVehicleByVinNo(vin).getData();
scmVehicleGressionVeh.setVehSid(baseVehicleVo.getSid());
scmVehicleGressionVeh.setSettlementStatus(baseVehicleVo.getSettlementStatus());
scmVehicleGressionVeh.setSettlementStatusValue(baseVehicleVo.getSettlementStatusValue());
scmVehicleGressionVeh.setTemporaryCardNo(dto.getTemporaryCard());
scmVehicleGressionVehService.save(scmVehicleGressionVeh);
}
for (ScmVehicleGressionVehDto scmVehicleGressionVehDto : scmVehicleGressionVehDtos) {
ScmVehicleGressionVeh scmVehicleGressionVeh = new ScmVehicleGressionVeh();
BeanUtil.copyProperties(scmVehicleGressionVehDto, scmVehicleGressionVeh, "sid");
vinNo = scmVehicleGressionVehDto.getVehVin();
BaseVehicleVo baseVehicleVo = baseVehicleFeign.selVehicleByVinNo(vinNo).getData();
scmVehicleGressionVeh.setVehSid(baseVehicleVo.getSid());
scmVehicleGressionVeh.setMainSid(scmVehicleGression.getSid());
scmVehicleGressionVehService.save(scmVehicleGressionVeh);
}
save(scmVehicleGression);
} else {
scmVehicleGression = fetchBySid(dto.getSid());
if (scmVehicleGression == null) {
@ -452,19 +426,15 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
BeanUtil.copyProperties(dto, scmVehicleGression, "sid");
updateById(scmVehicleGression);
scmVehicleGressionVehService.deleteByMainSid(scmVehicleGression.getSid());
List<String> vins = dto.getVins();
if (vins != null) {
for (String vin : vins) {
ScmVehicleGressionVeh scmVehicleGressionVeh = new ScmVehicleGressionVeh();
scmVehicleGressionVeh.setMainSid(scmVehicleGression.getSid());
scmVehicleGressionVeh.setVehVin(vin);
BaseVehicleVo baseVehicleVo = baseVehicleFeign.selVehicleByVinNo(vin).getData();
scmVehicleGressionVeh.setVehSid(baseVehicleVo.getSid());
scmVehicleGressionVeh.setSettlementStatus(baseVehicleVo.getSettlementStatus());
scmVehicleGressionVeh.setSettlementStatusValue(baseVehicleVo.getSettlementStatusValue());
scmVehicleGressionVeh.setTemporaryCardNo(dto.getTemporaryCard());
scmVehicleGressionVehService.save(scmVehicleGressionVeh);
}
//存放车架号
for (ScmVehicleGressionVehDto scmVehicleGressionVehDto : scmVehicleGressionVehDtos) {
ScmVehicleGressionVeh scmVehicleGressionVeh = new ScmVehicleGressionVeh();
BeanUtil.copyProperties(scmVehicleGressionVehDto, scmVehicleGressionVeh, "sid");
vinNo = scmVehicleGressionVehDto.getVehVin();
BaseVehicleVo baseVehicleVo = baseVehicleFeign.selVehicleByVinNo(vinNo).getData();
scmVehicleGressionVeh.setVehSid(baseVehicleVo.getSid());
scmVehicleGressionVeh.setMainSid(scmVehicleGression.getSid());
scmVehicleGressionVehService.save(scmVehicleGressionVeh);
}
}
return rb.success().setData(scmVehicleGression.getSid()).setMsg("保存成功");
@ -485,8 +455,10 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
AppUserOrgInfoVo data = sysUserFeign.getUserOrgInfoByUserSid(userSid).getData();
SysStaffinfoVo data1 = sysUserFeign.getSysUserByMobile(data.getStaffSid()).getData();
AppScmVehicleGressionInfoVo vo = baseMapper.getCarTransferInfo(sid, useOrgSid);
List<String> vins = scmVehicleGressionVehService.fetchVoByMainSid(sid);
vo.setVins(vins);
// List<String> vins = scmVehicleGressionVehService.fetchVoByMainSid(sid);
// vo.setVins(vins);
List<ScmVehicleGressionVehVo> scmVehicleGressionVehVos = scmVehicleGressionVehService.selectInfoVoByMainSid(sid);
vo.setScmVehicleGressionVehs(scmVehicleGressionVehVos);
vo.setApplicantName(data1.getName());
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String format = simpleDateFormat.format(new Date());
@ -517,6 +489,8 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
List<String> policyImage = new ArrayList<>();
List<String> image = new ArrayList<>();
AppScmVehicleGressionDetailsVo vo = baseMapper.getCarTransfer(sid);
List<ScmVehicleGressionVehVo> scmVehicleGressionVehVos = scmVehicleGressionVehService.selectInfoVoByMainSid(sid);
vo.setScmVehicleGressionVehs(scmVehicleGressionVehVos);
if ("1".equals(vo.getInsuranceStateKey())) {
vo.setInsuranceShow(true);
}
@ -718,15 +692,18 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
if (r == 0) {
return rb.setMsg("操作失败!提交的数据不一致");
}
List<String> vins = dto.getVins();
for (String vin : vins) {
List<String> sids = scmVehicleGressionVehService.fetchVoByVins(vin);
for (String sid : sids) {
List<ScmVehicleGressionVo> scmVehicleGressionVos = baseMapper.getlastTimeEqual(sid, dto.getTargetLocationSid());
if (scmVehicleGressionVos.size() > 0) {
if (StringUtils.isNotBlank(scmVehicleGressionVos.get(0).getNodeState())) {
if (scmVehicleGressionVos.get(0).getNodeState().contains("已办结") || !(scmVehicleGressionVos.get(0).getNodeState().contains("终止")) || !(scmVehicleGressionVos.get(0).getNodeState().contains("申请"))) {
return rb.setMsg("该申请中" + vin + "已存在,请勿重复提交!");
//存放车架号
if (r == 1) {
List<ScmVehicleGressionVehDto> scmVehicleGressionVehDtos = dto.getScmVehicleGressionVehs();
for (ScmVehicleGressionVehDto scmVehicleGressionVehDto : scmVehicleGressionVehDtos) {
List<String> sids = scmVehicleGressionVehService.fetchVoByVins(scmVehicleGressionVehDto.getVehVin());
for (String sid : sids) {
List<ScmVehicleGressionVo> scmVehicleGressionVos = baseMapper.getlastTimeEqual(sid, dto.getTargetLocationSid());
if (scmVehicleGressionVos.size() > 0) {
if (StringUtils.isNotBlank(scmVehicleGressionVos.get(0).getNodeState())) {
if (scmVehicleGressionVos.get(0).getNodeState().contains("已办结") || !(scmVehicleGressionVos.get(0).getNodeState().contains("终止")) || !(scmVehicleGressionVos.get(0).getNodeState().contains("申请"))) {
return rb.setMsg("该申请中" + scmVehicleGressionVehDto.getVehVin() + "已存在,请勿重复提交!");
}
}
}
}
@ -771,7 +748,7 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
//流程定义id
bv.setModelId(ProcDefEnum.SCMCARTRANSFER.getProDefId());
//调出方负责人
// bv.setNextNodeUserSids(dto.getPersonUserSid());
bv.setNextNodeUserSids(dto.getPersonUserSid());
if (r == 1) {
ResultBean<UpdateFlowFieldVo> voResultBean = flowableFeign.startProcess(bv);
UpdateFlowFieldVo ufVo = voResultBean.getData();
@ -888,7 +865,7 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
messageFlowableQuery.setMsgTitle("供应链");
ResultBean<String> stringResultBean = messageFeign.pushMessage(messageFlowableQuery);
}else{
} else {
//推送车辆台账数据
VehicleGression vehicleGression = new VehicleGression();
List<String> list = scmVehicleGressionVehService.fetchVoByMainSid(scmVehicleGression.getSid());
@ -1166,13 +1143,24 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
temporaryExitPermitInfo.setOrgName(sysOrganization.getName());
temporaryExitPermitInfo.setDate(new Date());
temporaryExitPermitInfo.setContractNo("—");
if(StringUtils.isNotBlank(scmVehicleGression.getVehicleSid())){
BaseVehicleSelectVo data = baseVehicleFeign.details(scmVehicleGression.getVehicleSid()).getData();
ExiCarConfigDetailVo exiCarConfigDetailVo = baseVehicleFeign.selectExiCarConfig(data.getModelSid(), data.getModelConfigSid(), data.getVehModelConfigSid()).getData();
temporaryExitPermitInfo.setModelName(exiCarConfigDetailVo.getVehicleAlias() + exiCarConfigDetailVo.getCarColor());
}
temporaryExitPermitInfo.setNum("1");
temporaryExitPermitInfo.setVinNo(scmVehicleGression.getVinNo());
String vin = "";
String modelName = "";
List<String> list = scmVehicleGressionVehService.fetchVoByMainSid(sid);
if (list.size() > 0) {
for (String s : list) {
vin = s + "," + vin;
List<String> vinSids = scmVehicleGressionVehService.fetchVoByVinSids(s);
for (String vinSid : vinSids) {
BaseVehicleSelectVo data = baseVehicleFeign.details(vinSid).getData();
ExiCarConfigDetailVo exiCarConfigDetailVo = baseVehicleFeign.selectExiCarConfig(data.getModelSid(), data.getModelConfigSid(), data.getVehModelConfigSid()).getData();
String model = exiCarConfigDetailVo.getVehicleAlias() + exiCarConfigDetailVo.getCarColor();
modelName = model + "," + modelName;
}
}
}
temporaryExitPermitInfo.setVinNo(vin);
temporaryExitPermitInfo.setModelName(modelName);
temporaryExitPermitInfo.setReason("存放地点变更");
temporaryExitPermitInfo.setCreatName(scmVehicleGression.getOperator());
temporaryExitPermitInfo.setCarryCarName("—");

2
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclegressionveh/ScmVehicleGressionVehMapper.java

@ -68,7 +68,7 @@ public interface ScmVehicleGressionVehMapper extends BaseMapper<ScmVehicleGressi
List<ScmVehicleGressionVehVo> selectListVo();
@Select("select * from scm_vehicle_gression_veh where mainSid =#{mainSid} ")
List<ScmVehicleGressionVehDetailsVo> fetchVoByMainSid(@Param("mainSid") String mainSid);
List<ScmVehicleGressionVehVo> fetchVoByMainSid(@Param("mainSid") String mainSid);
@Delete("delete from scm_vehicle_gression_veh where mainSid =#{sid}")
void deleteByMainSid(@Param("sid") String sid);

18
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclegressionveh/ScmVehicleGressionVehService.java

@ -107,8 +107,8 @@ public class ScmVehicleGressionVehService extends MybatisBaseService<ScmVehicleG
public List<String> fetchVoByMainSid(String mainSid) {
List<String> list = new ArrayList<>();
List<ScmVehicleGressionVehDetailsVo> vos = baseMapper.fetchVoByMainSid(mainSid);
for (ScmVehicleGressionVehDetailsVo vo : vos) {
List<ScmVehicleGressionVehVo> vos = baseMapper.fetchVoByMainSid(mainSid);
for (ScmVehicleGressionVehVo vo : vos) {
list.add(vo.getVehVin());
}
return list;
@ -126,4 +126,18 @@ public class ScmVehicleGressionVehService extends MybatisBaseService<ScmVehicleG
}
return list;
}
public List<String> fetchVoByVinSids(String vin) {
List<String> list = new ArrayList<>();
List<ScmVehicleGressionVehDetailsVo> vos = baseMapper.fetchVoByVins(vin);
for (ScmVehicleGressionVehDetailsVo vo : vos) {
list.add(vo.getVehSid());
}
return list;
}
public List<ScmVehicleGressionVehVo> selectInfoVoByMainSid(String sid) {
List<ScmVehicleGressionVehVo> vos = baseMapper.fetchVoByMainSid(sid);
return vos;
}
}

137
anrui-scm/anrui-scm-ui/src/api/specialrebate/specialrebatecheck.js

@ -0,0 +1,137 @@
import request from '@/utils/request'
export default {
// 单车返利核对(待核对)查询分页列表
listPage: function(data) {
return request({
url: '/scm/v1/scmspecialrebate/checkApplyGetSpecialRebate',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 单车返利核对(待核对)列表保存修改记录
updateDate: function(data) {
return request({
url: '/scm/v1/scmspecialrebate/save',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 单车返利核对(待核对)列表调整修改记录
adjustment: function(data) {
return request({
url: '/scm/v1/scmspecialrebate/adjustment',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 单车返利核对申请--点击添加--选择已核对单车返利信息
checkApplyGetAlreadyUploadVehRebate: function(data) {
return request({
url: '/scm/v1/scmspecialrebate/checkApplyGetAlreadyUploadSpecialRebate',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 核对审核申请分页列表
pagelist: function(data) {
return request({
url: '/scm/v1/scmspecialrebatecheckapply/listPage',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 删除
delete: function(params) {
return request({
url: '/scm/v1/scmspecialrebatecheckapply/delBySids',
method: 'DELETE',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 通过sid查询一条记录
fetchDetailsBySid: function(data) {
return request({
url: '/scm/v1/scmspecialrebatecheckapply/fetchDetailsBySid/' + data,
method: 'get'
})
},
// 专项返利核对审核申请保存
save: function(data) {
return request({
url: '/scm/v1/scmspecialrebatecheckapply/save',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 查看明细
vehRebateWithDetails: function(data) {
return request({
url: '/scm/v1/scmspecialrebatewith/specialRebateWithDetails/' + data,
method: 'get'
})
},
// 提交流程
submitVehicleApply: function(params) {
return request({
url: '/scm/v1/scmspecialrebatecheckapply/submitSpecialRebateCheckApply',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 代办任务同意办理
complete: function(params) {
return request({
url: '/scm/v1/scmspecialrebatecheckapply/complete',
method: 'post',
data: params
})
},
// 代办任务驳回任务
reject: function(params) {
return request({
url: '/scm/v1/scmspecialrebatecheckapply/reject',
method: 'post',
data: params
})
},
// 代办任务终止任务
breakProcess: function(params) {
return request({
url: '/scm/v1/scmspecialrebatecheckapply/breakProcess',
method: 'post',
data: params
})
},
// 代办任务撤回任务
revokeProcess: function(params) {
return request({
url: '/scm/v1/scmspecialrebatecheckapply/revokeProcess',
method: 'post',
data: params
})
},
getNextNodesForSubmit: function(data) {
return request({
url: '/scm/v1/scmspecialrebatecheckapply/getNextNodesForSubmit',
method: 'get',
params: data
})
},
getPreviousNodesForReject(data) {
return request({
url: '/scm/v1/scmspecialrebatecheckapply/getPreviousNodesForReject',
method: 'get',
params: data
})
}
}

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

@ -477,18 +477,24 @@ const codemenu = [
name: 'ZhuanXiangFanLiGuanLi',
meta: { title: '专项返利管理', noCache: true }
},
// {
// path: '/bikerebate/bicyclerebatewithholding',
// component: () => import('@/views/bikerebate/bicyclerebatewithholding/bicyclerebatewithholding.vue'),
// name: 'bicyclerebatewithholding',
// meta: { title: '单车返利预提', noCache: true }
// },
// {
// path: '/bikerebate/bicyclerebatecheck',
// component: () => import('@/views/bikerebate/bicyclerebatecheck/bicyclerebatetobechecked.vue'),
// name: 'bicyclerebatetobechecked',
// meta: { title: '单车返利核对', noCache: true }
// }
{
path: '/specialrebate/specialrebatewithholding',
component: () => import('@/views/specialrebate/specialrebatewithholding/specialrebatewithholding.vue'),
name: 'ZhuanXiangFanLiYuTi',
meta: { title: '专项返利预提', noCache: true }
},
{
path: '/specialrebate/specialrebatecheck',
component: () => import('@/views/specialrebate/specialrebatecheck/specialrebatetobechecked.vue'),
name: 'specialrebatetobechecked',
meta: { title: '专项返利核对', noCache: true }
},
{
path: '/specialrebate/specialrebatedistribution',
component: () => import('@/views/specialrebate/specialrebatedistribution/specialrebatetobeallocated.vue'),
name: 'specialrebatetobeallocated',
meta: { title: '专项返利核对', noCache: true }
}
]
},
// 入库管理
@ -992,6 +998,49 @@ const codemenu = [
component: () =>
import('@/views/workFlow/danchefanliheduiFlow/danchefanliheduiEdit.vue'),
name: 'danchefanliheduiEdit'
},
// 专项返利预提申请详情页面
{
path: '/zhuanxiangfanliyutiFlow/zhuanxiangfanliyutiDaiBanInfo',
component: () =>
import('@/views/workFlow/zhuanxiangfanliyutiFlow/zhuanxiangfanliyutiDaiBanInfo.vue'),
name: 'zhuanxiangfanliyutiDaiBanInfo'
},
// 专项返利预提详情
{
path: '/zhuanxiangfanliyutiFlow/zhuanxiangfanliyutiYiBanInfo',
component: () =>
import('@/views/workFlow/zhuanxiangfanliyutiFlow/zhuanxiangfanliyutiYiBanInfo.vue'),
name: 'zhuanxiangfanliyutiYiBanInfo'
},
// 专项返利预提办理
{
path: '/zhuanxiangfanliyutiFlow/zhuanxiangfanliyutiEdit',
component: () =>
import('@/views/workFlow/zhuanxiangfanliyutiFlow/zhuanxiangfanliyutiEdit.vue'),
name: 'zhuanxiangfanliyutiEdit'
},
// 专项返利核对申请详情页面
{
path: '/zhuanxiangfanliheduiFlow/zhuanxiangfanliheduiDaiBanInfo',
component: () =>
import('@/views/workFlow/zhuanxiangfanliheduiFlow/zhuanxiangfanliheduiDaiBanInfo.vue'),
name: 'zhuanxiangfanliheduiDaiBanInfo'
},
// 专项返利核对详情
{
path: '/zhuanxiangfanliheduiFlow/zhuanxiangfanliheduiYiBanInfo',
component: () =>
import('@/views/workFlow/zhuanxiangfanliheduiFlow/zhuanxiangfanliheduiYiBanInfo.vue'),
name: 'zhuanxiangfanliheduiYiBanInfo'
},
// 专项返利核对办理
{
path: '/zhuanxiangfanliheduiFlow/zhuanxiangfanliheduiEdit',
component: () =>
import('@/views/workFlow/zhuanxiangfanliheduiFlow/zhuanxiangfanliheduiEdit.vue'),
name: 'zhuanxiangfanliheduiEdit'
}
]
export default codemenu

172
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/relation/specialrebatetobecheckedAdd.vue

@ -0,0 +1,172 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="danger" size="small" @click="handleDelete">删除</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="listconadd">
<el-form ref="form_obj" class="formadd">
<el-table :key="tableKey" :data="list" :index="index" border style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" align="center" width="50px"/>
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="品牌" align="center">
<template slot-scope="scope">
<span>{{ scope.row.brandName }}</span>
</template>
</el-table-column>
<el-table-column label="创建日期" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="返利类型" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.rebateTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="返利名称" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.rebateName }}</span>
</template>
</el-table-column>
<el-table-column label="预计返利" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.estimateRebate }}</span>
</template>
</el-table-column>
<el-table-column label="上传日期" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.uploadDate }}</span>
</template>
</el-table-column>
<el-table-column label="上传金额" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.uploadMoney }}</span>
</template>
</el-table-column>
<el-table-column label="待确定金额" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.stayDetermineMoney }}</span>
</template>
</el-table-column>
<el-table-column label="费用" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.money }}</span>
</template>
</el-table-column>
<el-table-column label="是否调整" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.isAdjustment }}</span>
</template>
</el-table-column>
<el-table-column label="调整金额" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.adjustmentMoney }}</span>
</template>
</el-table-column>
<el-table-column label="调整说明" align="center" width="300">
<template slot-scope="scope">
<span>{{ scope.row.adjustmentRemarks }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
<!--End 添加修改部分-->
</div>
</template>
<script>
import req from '@/api/specialrebate/specialrebatecheck'
export default {
name: 'specialrebatetobecheckedAdd',
data() {
return {
viewTitle: '',
index: 0,
tableKey: 0,
viewState: 1,
rebateType: '',
sids: [],
//
list: [],
rules: {},
submitdisabled: false
}
},
methods: {
handleSelectionChange(row) {
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
console.log('sids', this.sids)
},
showInfo(row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '专项返利核对审核申请明细'
this.rebateType = row.rebateTypeValue
console.log('编辑回显', row)
req.vehRebateWithDetails(row.specialRebateSids).then((resp) => {
this.list = resp.data
}).catch((e) => {
this.list = []
})
},
handleDelete() {
if (this.sids.length === 0) {
this.$message({
showClose: true,
type: 'error',
message: '请选择至少一条记录进行删除操作'
})
return
}
for (var i = 0; i < this.list.length; i++) {
for (var j = 0; j < this.sids.length; j++) {
if (this.list[i].sid === this.sids[j]) {
this.list.splice(i, 1)
}
}
}
},
// ===
handleReturn() {
//
const data_list = []
for (var i = 0; i < this.list.length; i++) {
data_list.push({
sid: this.list[i].sid,
rebateTypeValue: this.list[i].rebateTypeValue,
rebateTypeKey: this.list[i].rebateTypeKey,
withRebate: this.list[i].estimateRebate,
brandName: this.list[i].brandName,
brandSid: this.list[i].brandSid,
uploadMoney: this.list[i].uploadMoney,
stayDetermineMoney: this.list[i].stayDetermineMoney,
adjustmentMoney: this.list[i].adjustmentMoney,
money: this.list[i].money
})
}
this.$emit('backAdd', data_list, this.rebateType)
}
}
}
</script>
<style scoped>
</style>

130
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/relation/specialrebatetobecheckedInfo.vue

@ -0,0 +1,130 @@
<template>
<div class="app-container">
<div>
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="listconadd">
<el-form ref="form_obj" class="formadd">
<el-table :key="tableKey" :data="list" :index="index" border style="width: 100%">
<el-table-column fixed width="60px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="品牌" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.brandName }}</span>
</template>
</el-table-column>
<el-table-column label="创建日期" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="返利类型" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.rebateTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="返利名称" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.rebateName }}</span>
</template>
</el-table-column>
<el-table-column label="预计返利" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.estimateRebate }}</span>
</template>
</el-table-column>
<el-table-column label="上传日期" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.uploadDate }}</span>
</template>
</el-table-column>
<el-table-column label="上传金额" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.uploadMoney }}</span>
</template>
</el-table-column>
<el-table-column label="待确定金额" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.stayDetermineMoney }}</span>
</template>
</el-table-column>
<el-table-column label="费用" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.money }}</span>
</template>
</el-table-column>
<el-table-column label="是否调整" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.isAdjustment }}</span>
</template>
</el-table-column>
<el-table-column label="调整金额" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.adjustmentMoney }}</span>
</template>
</el-table-column>
<el-table-column label="调整说明" align="center" width="300">
<template slot-scope="scope">
<span>{{ scope.row.adjustmentRemarks }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
<!--End 添加修改部分-->
</div>
</template>
<script>
import req from '@/api/specialrebate/specialrebatecheck'
export default {
name: 'sepcialrebatetobecheckedInfo',
data() {
return {
viewTitle: '',
index: 0,
tableKey: 0,
viewState: 1,
sids: [],
//
list: [],
rules: {},
submitdisabled: false
}
},
methods: {
showInfo(row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '专项返利核对审核申请明细'
console.log('编辑回显', row)
req.vehRebateWithDetails(row.specialRebateSids).then((resp) => {
this.list = resp.data
}).catch((e) => {
this.list = []
})
},
// ===
handleReturn() {
//
this.list = []
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}
}
}
</script>
<style scoped>
</style>

331
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/relation/yiheduizhuanxiangfanli.vue

@ -0,0 +1,331 @@
<template>
<div class="app-container">
<!-- Start 列表页面 -->
<div>
<button-bar view-title="已上传专项返利列表" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div class="main-content">
<!-- <div class="searchcon">-->
<!-- <el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>-->
<!-- <div v-show="isSearchShow" class="search">-->
<!-- <el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">-->
<!-- <el-form-item label="品牌">-->
<!-- <el-input v-model="listQuery.params.mainSid" placeholder="请输入车架号" clearable/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="车型">-->
<!-- <el-input v-model="listQuery.params.mainSid" placeholder="请输入车架号" clearable/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="车架号">-->
<!-- <el-input v-model="listQuery.params.mainSid" placeholder="请输入车架号" clearable/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="创建日期">-->
<!-- <el-date-picker v-model="listQuery.params.createStartTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>-->
<!-- <span style="padding: 0 8px"></span>-->
<!-- <el-date-picker v-model="listQuery.params.createEndTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="返利类型">-->
<!-- <el-input v-model="listQuery.params.mainSid" placeholder="请输入车架号" clearable/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="返利名称">-->
<!-- <el-input v-model="listQuery.params.mainSid" placeholder="请输入车架号" clearable/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="状态">-->
<!-- <el-input v-model="listQuery.params.mainSid" placeholder="请输入车架号" clearable/>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <div class="btn" style="text-align: center;">-->
<!-- <el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button>-->
<!-- <el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<div class="listtop">
<div class="tit">已上传专项返利列表</div>
</div>
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" align="center" width="50px"/>
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80px"/>
<el-table-column label="品牌" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.brandName }}</span>
</template>
</el-table-column>
<el-table-column label="创建日期" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="返利类型" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.rebateTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="返利名称" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.rebateName }}</span>
</template>
</el-table-column>
<el-table-column label="预计返利" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.estimateRebate }}</span>
</template>
</el-table-column>
<el-table-column label="上传日期" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.uploadDate }}</span>
</template>
</el-table-column>
<el-table-column label="上传金额" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.uploadMoney }}</span>
</template>
</el-table-column>
<el-table-column label="待确定金额" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.stayDetermineMoney }}</span>
</template>
</el-table-column>
<el-table-column label="费用" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.money }}</span>
</template>
</el-table-column>
<el-table-column label="是否调整" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.isAdjustment }}</span>
</template>
</el-table-column>
<el-table-column label="调整金额" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.adjustmentMoney }}</span>
</template>
</el-table-column>
<el-table-column label="调整说明" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.adjustmentRemarks }}</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/specialrebate/specialrebatecheck'
import Pagination from '@/components/pagination'
import ButtonBar from '@/components/ButtonBar'
export default {
name: 'yiheduizhuanxiangfanli',
components: {
Pagination,
ButtonBar
},
data() {
return {
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: '',
btnKey: 'doConfirm',
btnLabel: '确定'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
// -----------
tableKey: 0,
list: [],
sids: [],
sids_list: [],
FormLoading: false,
listLoading: false,
listQuery: {
params: {
brandSid: '',
createOrgSid: '',
sidList: []
},
current: 1,
size: 5,
total: 0
},
rules: {}
}
},
created() {
//
this.getList()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'doConfirm':
this.doConfirm()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
handleSelectionChange(row) {
var dateTime = ''
let date = new Date()
let year = date.getFullYear() //
let month = date.getMonth() + 1 //
dateTime = year + '年' + month + '月'
const aa = []
const bb = []
row.forEach((element) => {
if (element.withholdingDateCopy === dateTime) {
aa.push({
sid: element.sid,
rebateTypeValue: element.rebateTypeValue,
rebateTypeKey: element.rebateTypeKey,
withRebate: element.estimateRebate,
brandName: element.brandName,
brandSid: element.brandSid,
uploadMoney: element.uploadMoney,
stayDetermineMoney: element.stayDetermineMoney,
adjustmentMoney: element.adjustmentMoney,
money: element.money
})
} else {
bb.push({
sid: element.sid,
withholdingDate: element.withholdingDateCopy,
withRebate: element.estimateRebate,
uploadMoney: element.uploadMoney,
stayDetermineMoney: element.stayDetermineMoney,
adjustmentMoney: element.adjustmentMoney,
money: element.money
})
}
})
this.sids = aa
this.sids_list = bb
console.log('sids', this.sids, bb, 99999999)
},
//
getList() {
this.listLoading = true
req.checkApplyGetAlreadyUploadVehRebate(this.listQuery).then((response) => {
console.log('列表查询结果:', response)
this.listLoading = false
if (response.success && response.data && response.data.total > 0) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
showData(value, val, createOrgSid, brandSid) {
console.log(value, val, 898989)
this.listQuery.params.createOrgSid = createOrgSid
this.listQuery.params.brandSid = brandSid
const aa = []
if (value.length > 0) {
for (var i = 0; i < value.length; i++) {
for (var j = 0; j < value[i].specialRebateSids.length; j++) {
aa.push(value[i].specialRebateSids[j])
}
}
}
const bb = []
if (val.length > 0) {
for (var k = 0; k < val.length; k++) {
for (var l = 0; l < val[k].specialRebateSids.length; l++) {
bb.push(val[k].specialRebateSids[l])
}
}
}
if (aa.length > 0 && bb.length > 0) {
this.listQuery.params.sidList = aa
for (var p = 0; p < bb.length; p++) {
this.listQuery.params.sidList.push(bb[p])
}
} else if (aa.length > 0 && bb.length === 0) {
this.listQuery.params.sidList = aa
} else if (aa.length === 0 && bb.length > 0) {
this.listQuery.params.sidList = bb
} else if (aa.length === 0 && bb.length === 0) {
this.listQuery.params.sidList = []
}
this.getList()
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
handleReset() {
this.listQuery = {
params: {
createBySid: '',
createEndTime: '',
createStartTime: ''
},
current: 1,
size: 5,
total: 0
}
this.getList()
},
doConfirm() {
if (this.sids.length > 0 || this.sids_list.length > 0) {
this.$emit('backData', this.sids, this.sids_list)
} else {
this.$notify({
title: '提示',
message: '请选择至少一条记录!',
type: 'error',
duration: 2000
})
}
},
doClose() {
this.$emit('doback')
}
}
}
</script>
<style scoped>
</style>

365
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/specialrebatecheck.vue

@ -0,0 +1,365 @@
<template>
<div class="app-container">
<!-- Start 列表页面 -->
<div v-show="viewState == 1">
<button-bar view-title="专项返利核对审核申请管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div class="main-content">
<div class="switch_btn">
<el-button class="" @click="handleClick">待核对</el-button>
<el-button :class="{btn_style:viewState === 1}">核对审核申请</el-button>
</div>
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
<el-form-item label="品牌">
<el-select v-model="listQuery.params.brandSid" placeholder="请选择" filterable clearable>
<el-option v-for="item in brand_list" :key="item.sid" :label="item.brandName" :value="item.sid"/>
</el-select>
</el-form-item>
<el-form-item label="申请标题">
<el-input v-model="listQuery.params.checkApply" placeholder="" clearable/>
</el-form-item>
<el-form-item label="创建日期">
<el-date-picker v-model="listQuery.params.createStartTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.createEndTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button>
</div>
</div>
</div>
<div class="listtop">
<div class="tit">专项返利核对审核申请列表</div>
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" align="center" width="50px"/>
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80px"/>
<el-table-column fixed label="操作" align="center" width="180px" >
<template slot-scope="scope">
<el-button type="primary" size="mini" :disabled="scope.row.nodeState =='发起申请' ? false : scope.row.nodeState == '待提交' ? false : true" @click="toEdit(scope.row)">办理</el-button>
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button>
</template>
</el-table-column>
<el-table-column label="状态" width="180px" header-align="center">
<template slot-scope="scope">
<span v-if="scope.row.nodeState=='待提交'" type="primary" size="mini">待提交</span>
<span v-else @click="flowRecord(scope.row)" class="bluezi">{{ scope.row.nodeState }}</span>
</template>
</el-table-column>
<el-table-column label="分公司" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.createOrgName }}</span>
</template>
</el-table-column>
<el-table-column label="品牌" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.brandName }}</span>
</template>
</el-table-column>
<el-table-column label="申请标题" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.checkApply }}</span>
</template>
</el-table-column>
<el-table-column label="预提返利" align="center" width="250">
<template slot-scope="scope">
<span>{{ scope.row.estimateRebate }}</span>
</template>
</el-table-column>
<el-table-column label="上传金额" align="center" width="250">
<template slot-scope="scope">
<span>{{ scope.row.uploadMoney }}</span>
</template>
</el-table-column>
<el-table-column label="待确定金额" align="center" width="250">
<template slot-scope="scope">
<span>{{ scope.row.stayDetermineMoney }}</span>
</template>
</el-table-column>
<el-table-column label="费用" align="center" width="250">
<template slot-scope="scope">
<span>{{ scope.row.money }}</span>
</template>
</el-table-column>
<el-table-column label="调整金额" align="center" width="250">
<template slot-scope="scope">
<span>{{ scope.row.adjustmentMoney }}</span>
</template>
</el-table-column>
<el-table-column label="创建日期" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="创建人" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.createByName }}</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
</div>
</div>
<specialrebatecheckAdd v-show="viewState == 2" ref="divAdd" @doback="resetState" @reloadlist="getList"/>
<specialrebatecheckInfo v-show="viewState == 3" ref="divInfo" @doback="resetState"/>
<el-dialog title="" :visible.sync="centerDialogVisible" width="78%" height="1%" :before-close="closeIt" center>
<iframe frameborder="0" id="iframe" style="width:100%;" scrolling="no" :src="this.centerDialogVisible === true ? url :''"></iframe>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/specialrebate/specialrebatecheck'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import { brandDown, getPathSidByUserSid } from '@/api/cheliang/dictcommons'
import specialrebatecheckAdd from './specialrebatecheckAdd'
import specialrebatecheckInfo from './specialrebatecheckInfo'
import {getStorage} from "@/utils/auth";
export default {
name: 'specialrebatecheck',
components: {
Pagination,
pageye,
ButtonBar,
specialrebatecheckAdd,
specialrebatecheckInfo
},
data() {
return {
url: '',
dialogHeight: '80%',
centerDialogVisible: false,
btndisabled: false,
btnList: [
{
type: 'danger',
size: 'small',
icon: 'del',
btnKey: 'doDel',
btnLabel: '删除'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1,
// -----------
tableKey: 0,
list: [],
sids: [],
FormLoading: false,
listLoading: false,
brand_list: '',
listQuery: {
params: {
brandSid: '',
checkApply: '',
createOrgSid: '',
createEndTime: '',
createStartTime: ''
},
current: 1,
size: 5,
total: 0
},
rules: {}
}
},
mounted() {
// vuewindowpostMessagehandleMessage
window.addEventListener('message', this.handleMessage)
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
async handleMessage(event) {
var code = ''
if (event.data.params !== null && event.data.params !== undefined) {
code = event.data.params.code
}
if (code === 1) {
this.init()
this.centerDialogVisible = false
} else if (code === 2) {
this.dialogHeight = event.data.params.data
this.setIframeHeight(document.getElementById('iframe'))
}
},
closeIt() {
this.url = ''
this.centerDialogVisible = false
},
setIframeHeight(iframe) {
iframe.height = this.dialogHeight
},
flowRecord(row) {
this.centerDialogVisible = true
var params = {
deployId: row.procDefId,
procInsId: row.procInstId,
token: getStorage()
}
this.url = '/#/flow/flowRecordForBusiness?data=' + encodeURI((JSON.stringify(params)))
},
init() {
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((resp) => {
if (resp.success) {
this.listQuery.params.createOrgSid = resp.data
brandDown({ useOrg: this.listQuery.params.createOrgSid }).then((res) => {
if (res.success) {
this.brand_list = res.data
}
})
this.getList()
}
})
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'doDel':
this.doDel()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
handleSelectionChange(row) {
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
console.log('sids', this.sids)
},
//
getList() {
this.listLoading = true
req.pagelist(this.listQuery).then((response) => {
console.log('列表查询结果:', response)
this.listLoading = false
if (response.success && response.data && response.data.total > 0) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
handleReset() {
this.listQuery = {
params: {
brandSid: '',
checkApply: '',
createOrgSid: '',
createEndTime: '',
createStartTime: ''
},
current: 1,
size: 5,
total: 0
}
this.init()
},
handleClick() {
this.$parent.resetState()
},
toEdit(row) {
this.viewState = 2
this.$refs['divAdd'].showEdit(row)
},
toInfo(row) {
this.viewState = 3
this.$refs['divInfo'].showInfo(row)
},
doDel() {
if (this.sids.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' })
return
}
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.delete(this.sids).then(resp => {
if (resp.success) {
this.$message({ type: 'success', message: resp.msg, showClose: true })
}
this.getList()
loading.close()
}).catch(e => {
loading.close()
})
}).catch(() => {
})
},
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
.switch_btn {
padding: 15px 0 10px 0;
}
.btn_style {
background-color: #018ad2;
color: white;
font-weight: 600;
}
</style>

564
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/specialrebatecheckAdd.vue

@ -0,0 +1,564 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="save()">保存
</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交
</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="listconadd">
<div class="titwu"><span>{{ formobj.checkApply }}专项返利核对审核申请</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd">
<el-row class="rowStyle">
<el-col :span="2" class="tleftb colOneStyle">
<span>品牌:</span>
</el-col>
<el-col :span="4" class="colOneStyle">
<el-form-item>
<el-select :disabled="dialogStatus === 'edit'" v-model="formobj.brandName" placeholder="请选择" filterable clearable @change="changeBrand">
<el-option v-for="item in brand_list" :key="item.sid" :label="item.brandName" :value="item.brandName"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="18" class="tleftb colOneStyle">
<el-button size="small" type="primary" @click="handleSelect()">添加</el-button>
</el-col>
</el-row>
<div class="title">
<div>本月各项返利核对情况</div>
</div>
<el-table :key="tableKey" :data="formobj.scmWhenSpecialrebateCheckapplydetailDetails" :index="index" border style="width: 100%">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="返利类型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.rebateTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.num }}</span>
</template>
</el-table-column>
<el-table-column label="预提金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.withRebate }}</span>
</template>
</el-table-column>
<el-table-column label="上传金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.uploadMoney }}</span>
</template>
</el-table-column>
<el-table-column label="待确认金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.stayDetermineMoney }}</span>
</template>
</el-table-column>
<el-table-column label="调整金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.adjustmentMoney }}</span>
</template>
</el-table-column>
<el-table-column label="费用" align="center">
<template slot-scope="scope">
<span>{{ scope.row.money }}</span>
</template>
</el-table-column>
<el-table-column label="明细" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="handleLook(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<div class="divStyle">
<div>预提返利本月核对情况</div>
<el-button type="primary" size="mini" class="btntopblueline" @click="handleCheck">往月核对情况</el-button>
</div>
<el-table :key="lastSpecialrebateKey" :data="formobj.scmLastSpecialrebateCheckapplydetailDetails" border style="width: 100%">
<el-table-column label="预提年月" align="center">
<template slot-scope="scope">
<span>{{ scope.row.withholdingDate }}</span>
</template>
</el-table-column>
<el-table-column label="预提数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.withholdingAmount }}</span>
</template>
</el-table-column>
<el-table-column label="预提金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.withRebate }}</span>
</template>
</el-table-column>
<el-table-column label="上传数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.uploadAmount }}</span>
</template>
</el-table-column>
<el-table-column label="上传金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.uploadMoney }}</span>
</template>
</el-table-column>
<el-table-column label="待确认金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.stayDetermineMoney }}</span>
</template>
</el-table-column>
<el-table-column label="调整金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.adjustmentMoney }}</span>
</template>
</el-table-column>
<el-table-column label="费用" align="center">
<template slot-scope="scope">
<span>{{ scope.row.money }}</span>
</template>
</el-table-column>
<el-table-column label="未上传数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.notUploadedAmount }}</span>
</template>
</el-table-column>
<el-table-column label="未上传金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.notUploadedCost }}</span>
</template>
</el-table-column>
</el-table>
<el-row>
<el-col :span="2" class="tleftb">
<span>备注</span>
</el-col>
<el-col :span="22">
<el-form-item><el-input v-model="formobj.remarks" placeholder="" class="addinputw" clearable></el-input></el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
<!--End 添加修改部分-->
<yiheduizhuanxiangfanli v-show="viewState == 2" ref="divSelect" @backData="backData" @doback="resetState"/>
<specialrebatetobecheckedAdd v-show="viewState == 3" ref="divAdd" @backAdd="backAdd" @doback="resetState"/>
<el-dialog :visible.sync="dialogVisible" width="60%">
<div class="titwu"><span>往月核对情况</span></div>
<el-form class="formadd">
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="3" class="tleftb">
<span>月促政策</span>
</el-col>
<el-col :span="21">
<el-form-item><span>{{ summation }}</span></el-form-item>
</el-col>
</el-row>
<el-table :key="checkKey" :data="checkList" border width="100%">
<el-table-column label="计提月份" align="center">
<template slot-scope="scope">
<span>{{ scope.row.month }}</span>
</template>
</el-table-column>
<el-table-column label="计提" align="center">
<template slot-scope="scope">
<span>{{ scope.row.month }}</span>
</template>
</el-table-column>
<el-table-column label="上传" align="center">
<template slot-scope="scope">
<span>{{ scope.row.month }}</span>
</template>
</el-table-column>
<el-table-column label="未上传" align="center">
<template slot-scope="scope">
<span>{{ scope.row.month }}</span>
</template>
</el-table-column>
<el-table-column label="调整" align="center">
<template slot-scope="scope">
<span>{{ scope.row.month }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/specialrebate/specialrebatecheck'
import { fetchBySid, brandDown } from '@/api/cheliang/dictcommons'
import yiheduizhuanxiangfanli from './relation/yiheduizhuanxiangfanli'
import specialrebatetobecheckedAdd from './relation/specialrebatetobecheckedAdd'
export default {
name: 'specialrebatecheckAdd',
components: {
yiheduizhuanxiangfanli,
specialrebatetobecheckedAdd
},
data() {
return {
viewTitle: '',
viewState: 1,
index: 0,
tableKey: 0,
lastSpecialrebateKey: 1,
checkKey: 2,
dialogVisible: false,
summation: '',
checkList: [],
dialogStatus: '',
brand_list: [],
//
formobj: {
sid: '',
createByName: '',
createBySid: '',
brandName: '',
brandSid: '',
checkApply: '',
createOrgName: '',
createOrgSid: '',
useOrgName: '',
useOrgSid: '',
remarks: '',
instanceId: '', // ID
taskId: '', // ID
scmWhenSpecialrebateCheckapplydetailDetails: [],
scmLastSpecialrebateCheckapplydetailDetails: []
},
rules: {},
submitdisabled: false
}
},
methods: {
//
newDate() {
let date = new Date()
let year = date.getFullYear() //
let month = date.getMonth() + 1 //
this.formobj.checkApply = year + '年' + month + '月'
},
init() {
fetchBySid(this.formobj.createOrgSid).then((res) => {
if (res.success) {
this.formobj.createOrgName = res.data.name
this.formobj.useOrgName = res.data.name
}
})
brandDown({ useOrg: this.formobj.createOrgSid }).then((res) => {
if (res.success) {
this.brand_list = res.data
}
})
},
showAdd(createOrgSid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
this.init()
this.newDate()
})
this.dialogStatus = 'add'
this.formobj.createOrgSid = createOrgSid
this.formobj.useOrgSid = createOrgSid
this.formobj.createByName = window.sessionStorage.getItem('name')
this.formobj.createBySid = window.sessionStorage.getItem('userSid')
this.viewTitle = '【新增】专项返利核对审核申请'
},
showEdit(row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.dialogStatus = 'edit'
this.viewTitle = '【编辑】专项返利核对审核申请'
console.log('编辑回显', row.sid)
req.fetchDetailsBySid(row.sid).then((resp) => {
this.formobj = resp.data
this.formobj.instanceId = resp.data.procInstId
}).catch((e) => {
this.formobj = row
})
},
changeBrand(value) {
let bb = null
this.brand_list.forEach((e) => {
if (e.brandName === value) {
bb = {
name: e.brandName,
sid: e.sid
}
}
})
this.formobj.brandSid = bb.sid
},
//
handleSelect() {
if (this.formobj.brandName === '' || this.formobj.brandName === null || this.formobj.brandName === undefined) {
this.$message({ showClose: true, type: 'error', message: '请先选择品牌' })
return
}
this.viewState = 2
this.$refs['divSelect'].showData(this.formobj.scmWhenSpecialrebateCheckapplydetailDetails, this.formobj.scmLastSpecialrebateCheckapplydetailDetails, this.formobj.createOrgSid, this.formobj.brandSid)
},
backData(value, val) {
this.viewState = 1
if (value.length > 0) {
for (var i in value) {
let cval = value[i]
if (!this.formobj.scmWhenSpecialrebateCheckapplydetailDetails || this.formobj.scmWhenSpecialrebateCheckapplydetailDetails.length === 0) {
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails = []
}
let v = 0
for (var j in this.formobj.scmWhenSpecialrebateCheckapplydetailDetails) {
if (this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].rebateTypeValue === cval.rebateTypeValue) {
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].num = parseInt(this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].num) + parseInt(1)
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].withRebate = parseInt(this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].withRebate) + parseInt(cval.withRebate)
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].uploadMoney = parseInt(this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].uploadMoney) + parseInt(cval.uploadMoney)
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].stayDetermineMoney = parseInt(this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].stayDetermineMoney) + parseInt(cval.stayDetermineMoney)
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].adjustmentMoney = parseInt(this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].adjustmentMoney) + parseInt(cval.adjustmentMoney)
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].money = parseInt(this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].money) + parseInt(cval.money)
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].specialRebateSids.push(cval.sid)
v = 1
break
}
}
if (v === 0) {
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails.push({
rebateTypeKey: cval.rebateTypeKey,
rebateTypeValue: cval.rebateTypeValue,
num: 1,
withRebate: cval.withRebate,
brandName: cval.brandName,
brandSid: cval.brandSid,
uploadMoney: cval.uploadMoney,
stayDetermineMoney: cval.stayDetermineMoney,
adjustmentMoney: cval.adjustmentMoney,
money: cval.money,
specialRebateSids: [cval.sid],
sid: '',
mainSid: ''
})
}
}
}
if (val.length > 0) {
for (var p in val) {
let bval = val[p]
if (!this.formobj.scmLastSpecialrebateCheckapplydetailDetails || this.formobj.scmLastSpecialrebateCheckapplydetailDetails.length === 0) {
this.formobj.scmLastSpecialrebateCheckapplydetailDetails = []
}
let v = 0
for (var l in this.formobj.scmLastSpecialrebateCheckapplydetailDetails) {
if (this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].withholdingDate === bval.withholdingDate) {
this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].withholdingAmount = parseInt(this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].withholdingAmount) + parseInt(1)
this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].uploadAmount = parseInt(this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].uploadAmount) + parseInt(1)
this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].withRebate = parseInt(this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].withRebate) + parseInt(bval.withRebate)
this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].uploadMoney = parseInt(this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].uploadMoney) + parseInt(bval.uploadMoney)
this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].stayDetermineMoney = parseInt(this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].stayDetermineMoney) + parseInt(bval.stayDetermineMoney)
this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].adjustmentMoney = parseInt(this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].adjustmentMoney) + parseInt(bval.adjustmentMoney)
this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].money = parseInt(this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].money) + parseInt(bval.money)
this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].specialRebateSids.push(bval.sid)
v = 1
break
}
}
if (v === 0) {
this.formobj.scmLastSpecialrebateCheckapplydetailDetails.push({
withholdingDate: bval.withholdingDate,
withholdingAmount: 1,
uploadAmount: 1,
withRebate: bval.withRebate,
uploadMoney: bval.uploadMoney,
stayDetermineMoney: bval.stayDetermineMoney,
adjustmentMoney: bval.adjustmentMoney,
money: bval.money,
notUploadedAmount: '',
notUploadedCost: '',
specialRebateSids: [bval.sid],
sid: '',
mainSid: ''
})
}
}
}
},
//
dataDelete(index) {
this.formobj.baseVehinstallModpricedetails.splice(index, 1)
},
handleLook(row) {
this.viewState = 3
this.$refs['divAdd'].showInfo(row)
},
backAdd(value, rebateType) {
this.viewState = 1
const aa = []
if (value.length > 0) {
for (var i in value) {
let cval = value[i]
let v = 0
for (var j in aa) {
if (aa[j].rebateTypeValue === cval.rebateTypeValue) {
aa[j].num = parseInt(aa[j].num) + parseInt(1)
aa[j].withRebate = parseInt(aa[j].withRebate) + parseInt(cval.withRebate)
aa[j].uploadMoney = parseInt(aa[j].uploadMoney) + parseInt(cval.uploadMoney)
aa[j].stayDetermineMoney = parseInt(aa[j].stayDetermineMoney) + parseInt(cval.stayDetermineMoney)
aa[j].adjustmentMoney = parseInt(aa[j].adjustmentMoney) + parseInt(cval.adjustmentMoney)
aa[j].money = parseInt(aa[j].money) + parseInt(cval.money)
aa[j].specialRebateSids.push(cval.sid)
v = 1
break
}
}
if (v === 0) {
aa.push({
rebateTypeKey: cval.rebateTypeKey,
rebateTypeValue: cval.rebateTypeValue,
num: 1,
withRebate: cval.withRebate,
brandName: cval.brandName,
brandSid: cval.brandSid,
uploadMoney: cval.uploadMoney,
stayDetermineMoney: cval.stayDetermineMoney,
adjustmentMoney: cval.adjustmentMoney,
money: cval.money,
specialRebateSids: [cval.sid],
sid: '',
mainSid: ''
})
}
}
for (var k = 0; k < this.formobj.scmWhenSpecialrebateCheckapplydetailDetails.length; k++) {
if (this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[k].rebateTypeValue === rebateType) {
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[k].rebateTypeKey = aa[0].rebateTypeKey
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[k].rebateTypeValue = aa[0].rebateTypeValue
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[k].num = aa[0].num
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[k].withRebate = aa[0].withRebate
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[k].brandName = aa[0].brandName
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[k].brandSid = aa[0].brandSid
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[k].uploadMoney = aa[0].uploadMoney
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[k].stayDetermineMoney = aa[0].stayDetermineMoney
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[k].adjustmentMoney = aa[0].adjustmentMoney
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[k].money = aa[0].money
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[k].specialRebateSids = aa[0].specialRebateSids
break
}
}
} else if (value.length === 0) {
for (var l = 0; l < this.formobj.scmWhenSpecialrebateCheckapplydetailDetails.length; l++) {
if (this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[l].rebateTypeValue === rebateType) {
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails.splice(l, 1)
break
}
}
}
},
resetState() {
this.viewState = 1
},
handleCheck() {
this.dialogVisible = true
},
save() {
console.log(this.formobj)
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.save(this.formobj).then((resp) => {
this.submitdisabled = false
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn('true')
}
}).catch(() => {
this.submitdisabled = false
})
} else {
return false
}
})
},
submit() {
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.submitVehicleApply(this.formobj).then((resp) => {
this.submitdisabled = false
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn('true')
}
}).catch(() => {
this.submitdisabled = false
})
} else {
return false
}
})
},
// ===
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
//
this.formobj = {
sid: '',
createByName: '',
createBySid: '',
brandName: '',
brandSid: '',
checkApply: '',
createOrgName: '',
createOrgSid: '',
useOrgName: '',
useOrgSid: '',
remarks: '',
instanceId: '', // ID
taskId: '', // ID
scmWhenSpecialrebateCheckapplydetailDetails: [],
scmLastSpecialrebateCheckapplydetailDetails: []
}
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}
}
}
</script>
<style scoped>
.divStyle {
padding: 7px;
font-weight: bold;
font-size: 16px;
background-color: #0294d7;
color: #ffffff;
text-align: left;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.rowStyle {
border-left: 0px;
}
.colOneStyle {
border-right: 0px !important;
border-bottom: 0px !important;
}
</style>

206
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/specialrebatecheckInfo.vue

@ -0,0 +1,206 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="listconadd">
<div class="titwu"><span>专项返利核对审核申请</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd">
<el-row class="rowStyle">
<el-col :span="2" class="tleftb colOneStyle">
<span>品牌:</span>
</el-col>
<el-col :span="22" class="colOneStyle">
<el-form-item><span>{{ formobj.brandName }}</span></el-form-item>
</el-col>
</el-row>
<div class="title">
<div>本月各项返利核对情况</div>
</div>
<el-table :key="tableKey" :data="formobj.scmWhenSpecialrebateCheckapplydetailDetails" :index="index" border style="width: 100%">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="返利类型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.rebateTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.num }}</span>
</template>
</el-table-column>
<el-table-column label="预提金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.withRebate }}</span>
</template>
</el-table-column>
<el-table-column label="上传金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.uploadMoney }}</span>
</template>
</el-table-column>
<el-table-column label="待确认金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.stayDetermineMoney }}</span>
</template>
</el-table-column>
<el-table-column label="调整金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.adjustmentMoney }}</span>
</template>
</el-table-column>
<el-table-column label="费用" align="center">
<template slot-scope="scope">
<span>{{ scope.row.money }}</span>
</template>
</el-table-column>
<el-table-column label="明细" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="handleLook(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<div class="title">
<div>预提返利本月核对情况</div>
</div>
<el-table :key="lastSpecialrebateKey" :data="formobj.scmLastSpecialrebateCheckapplydetailDetails" :index="index" border style="width: 100%">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="预提年月" align="center">
<template slot-scope="scope">
<span>{{ scope.row.withholdingDate }}</span>
</template>
</el-table-column>
<el-table-column label="预提数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.withholdingAmount }}</span>
</template>
</el-table-column>
<el-table-column label="预提金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.withRebate }}</span>
</template>
</el-table-column>
<el-table-column label="上传数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.uploadAmount }}</span>
</template>
</el-table-column>
<el-table-column label="上传金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.uploadMoney }}</span>
</template>
</el-table-column>
<el-table-column label="待确认金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.stayDetermineMoney }}</span>
</template>
</el-table-column>
<el-table-column label="调整金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.adjustmentMoney }}</span>
</template>
</el-table-column>
<el-table-column label="费用" align="center">
<template slot-scope="scope">
<span>{{ scope.row.money }}</span>
</template>
</el-table-column>
<el-table-column label="未上传数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.notUploadedAmount }}</span>
</template>
</el-table-column>
<el-table-column label="未上传金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.notUploadedCost }}</span>
</template>
</el-table-column>
</el-table>
<el-row>
<el-col :span="2" class="tleftb">
<span>备注</span>
</el-col>
<el-col :span="22">
<el-form-item><span>{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
<!--End 添加修改部分-->
<specialrebatetobecheckedInfo v-show="viewState == 2" ref="divInfo" @doback="resetState"/>
</div>
</template>
<script>
import req from '@/api/specialrebate/specialrebatecheck'
import specialrebatetobecheckedInfo from './relation/specialrebatetobecheckedInfo'
export default {
name: 'specialrebatecheckInfo',
components: {
specialrebatetobecheckedInfo
},
data() {
return {
viewTitle: '',
index: 0,
tableKey: 0,
lastSpecialrebateKey: 1,
viewState: 1,
//
formobj: {},
rules: {},
submitdisabled: false
}
},
methods: {
showInfo(row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '专项返利核对审核申请详情'
console.log('编辑回显', row.sid)
req.fetchDetailsBySid(row.sid).then((resp) => {
this.formobj = resp.data
}).catch((e) => {
this.formobj = row
})
},
handleLook(row) {
this.viewState = 2
this.$refs['divInfo'].showInfo(row)
},
resetState() {
this.viewState = 1
},
// ===
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
//
this.formobj = {}
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}
}
}
</script>
<style scoped>
.rowStyle {
border-left: 0px;
}
.colOneStyle {
border-right: 0px !important;
border-bottom: 0px !important;
}
</style>

675
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/specialrebatetobechecked.vue

@ -0,0 +1,675 @@
<template>
<div class="app-container">
<!-- Start 列表页面 -->
<div v-show="viewState == 1">
<button-bar view-title="待核对专项返利列表" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div class="main-content">
<div class="switch_btn">
<el-button :class="{btn_style:viewState === 1}">待核对</el-button>
<el-button class="" @click="handleClick">核对审核申请</el-button>
</div>
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
<el-form-item label="品牌">
<el-select v-model="listQuery.params.brandSid" placeholder="请选择" filterable clearable>
<el-option v-for="item in brand_list" :key="item.sid" :label="item.brandName" :value="item.sid"/>
</el-select>
</el-form-item>
<el-form-item label="创建日期">
<el-date-picker v-model="listQuery.params.createStartTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.createEndTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="返利类型">
<el-select v-model="listQuery.params.rebateTypeKey" placeholder="请选择" filterable clearable>
<el-option v-for="item in rebateType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="返利名称">
<el-input v-model="listQuery.params.rebateName" placeholder="" clearable/>
</el-form-item>
<!-- <el-form-item label="上传状态">-->
<!-- <el-select v-model="listQuery.params.state" placeholder="请选择" filterable clearable>-->
<!-- <el-option v-for="item in state_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button>
</div>
</div>
</div>
<div class="listtop">
<div class="tit">待核对专项返利列表</div>
<div>
<el-button size="mini" type="success">导入</el-button>
<el-button size="mini" type="success">导出</el-button>
</div>
</div>
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" align="center" width="50px"/>
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80px"/>
<el-table-column label="上传状态" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.uploadState === '0' ? '未调整' : scope.row.uploadState === '1' ? '已调整' : scope.row.uploadState === '2' ? '未上传' : scope.row.uploadState === '3' ? '已上传' : ''}}</span>
</template>
</el-table-column>
<el-table-column label="品牌" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.brandName }}</span>
</template>
</el-table-column>
<el-table-column label="创建日期" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="返利名称" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.rebateName }}</span>
</template>
</el-table-column>
<el-table-column label="返利类型" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.rebateTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="预计返利" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.estimateRebate }}</span>
</template>
</el-table-column>
<el-table-column label="上传日期" align="center" width="200">
<template slot-scope="scope">
<el-date-picker v-model="scope.row.uploadDate" type="date" style="width: 160px" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</template>
</el-table-column>
<el-table-column label="上传金额" align="center" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.uploadMoney" @keyup.native="UpNumber" @keydown.native="UpNumber" clearable placeholder=""></el-input>
</template>
</el-table-column>
<el-table-column label="二次上传日期" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.secondaryUploadDate }}</span>
</template>
</el-table-column>
<el-table-column label="二次上传金额" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.secondaryUploadMoney }}</span>
</template>
</el-table-column>
<el-table-column label="待确定金额" align="center" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.stayDetermineMoney" @keyup.native="UpNumber" @keydown.native="UpNumber" clearable placeholder=""></el-input>
</template>
</el-table-column>
<el-table-column label="费用" align="center" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.money" @keyup.native="UpNumber" @keydown.native="UpNumber" clearable placeholder=""></el-input>
</template>
</el-table-column>
<el-table-column label="是否调整" align="center" width="100">
<template slot-scope="scope"><!--@change="changeIsAdjustment(scope.row)" -->
<el-select v-model="scope.row.isAdjustment" @change="changeIsAdjustment(scope.row)" placeholder="" filterable>
<el-option v-for="item in whether_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
</el-select>
</template>
</el-table-column>
<el-table-column label="调整金额" align="center" width="150">
<template slot-scope="scope">
<!-- <el-input :disabled="scope.row.isAdjustment === '' || scope.row.isAdjustment === '否'" v-model="scope.row.adjustmentMoney" clearable placeholder=""></el-input>-->
<span>{{ scope.row.adjustmentMoney }}</span>
</template>
</el-table-column>
<el-table-column label="调整说明" align="center" width="300">
<template slot-scope="scope">
<el-input :disabled="scope.row.isAdjustment === '' || scope.row.isAdjustment === '否'" v-model="scope.row.adjustmentRemarks" clearable placeholder=""></el-input>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="180px" >
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="toSave(scope.row)">保存</el-button>
<el-button type="primary" :disabled="scope.row.isAdjustment === '' || scope.row.isAdjustment === '是'" size="mini" @click="toAdjust(scope.row)">调整</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
</div>
</div>
<specialrebatecheck v-show="viewState == 2" ref="divCheck" @doback="resetState"/>
<specialrebatecheckAdd v-show="viewState == 3" ref="divCheckAdd" @doback="resetState"/>
<el-dialog center :visible.sync="dialogVisible" width="60%">
<div class="app-container">
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="handleSave()">保存
</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd">
<div class="title">
<div><span>待确定金额</span></div>
</div>
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="4" class="tleftb">
<span>待确定金额</span>
</el-col>
<el-col :span="4">
<el-form-item><span>{{ formobj.stayDetermineMoney }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>其中含费用</span>
</el-col>
<el-col :span="4">
<el-form-item><el-input v-model="formobj.firstCost" clearable placeholder=""/></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>其中含返利</span>
</el-col>
<el-col :span="4">
<el-form-item><el-input v-model="formobj.firstRebate" clearable placeholder=""/></el-form-item>
</el-col>
</el-row>
<div class="title">
<el-checkbox v-model="checked"><span style="color: #FFFFFF">返利二次上传</span></el-checkbox>
</div>
<div v-if="checked">
<el-row>
<el-col :span="4" class="tleftb">
<span>剩余预计返利</span>
</el-col>
<el-col :span="4">
<el-form-item><span>{{ formobj.surplusRebate}}</span></el-form-item>
</el-col>
<el-col :span="4">
</el-col>
<el-col :span="4">
</el-col>
<el-col :span="4" class="tleftb">
<span>二次上传日期</span>
</el-col>
<el-col :span="4">
<el-form-item><el-date-picker v-model="formobj.secondaryUploadDate" type="date" clearable value-format="yyyy-MM-dd" style="width: 100%" placeholder="选择日期"/></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>二次上传金额</span>
</el-col>
<el-col :span="4">
<el-form-item><el-input v-model="formobj.secondaryUploadMoney" clearable placeholder=""/></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>其中含费用</span>
</el-col>
<el-col :span="4">
<el-form-item><el-input v-model="formobj.secondCost" clearable placeholder=""/></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>其中含返利</span>
</el-col>
<el-col :span="4">
<el-form-item><el-input v-model="formobj.secondRebate" clearable placeholder=""/></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>调整金额合计</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ adjustmentMoneyAdd() }}</span></el-form-item>
</el-col>
</el-row>
</div>
</el-form>
</div>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/specialrebate/specialrebatecheck'
import Pagination from '@/components/pagination'
import ButtonBar from '@/components/ButtonBar'
import specialrebatecheck from './specialrebatecheck'
import specialrebatecheckAdd from './specialrebatecheckAdd'
import { brandDown, getPathSidByUserSid, typeValues } from '@/api/cheliang/dictcommons'
export default {
name: 'specialrebatetobechecked',
components: {
Pagination,
ButtonBar,
specialrebatecheck,
specialrebatecheckAdd
},
data() {
return {
btndisabled: false,
dialogVisible: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: '',
btnKey: 'toAdd',
btnLabel: '核对审核申请'
},
{
type: 'primary',
size: 'small',
icon: '',
btnKey: 'toClick',
btnLabel: '调整'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1,
// -----------
tableKey: 0,
list: [],
sids: [],
FormLoading: false,
brand_list: [],
rebateType_list: [],
state_list: [
{
dictKey: 0,
dictValue: '未上传'
},
{
dictKey: 1,
dictValue: '已上传'
},
{
dictKey: 2,
dictValue: '未调整'
},
{
dictKey: 3,
dictValue: '已调整'
}
],
whether_list: [
{
dictKey: 0,
dictValue: '否'
},
{
dictKey: 1,
dictValue: '是'
}
],
listLoading: false,
listQuery: {
params: {
brandSid: '',
createOrgSid: '',
rebateTypeKey: '',
rebateName: '',
state: '',
createEndTime: '',
createStartTime: ''
},
current: 1,
size: 5,
total: 0
},
rules: {},
viewTitle: '返利调整',
submitdisabled: false,
checked: false,
formobj: {
sid: '',
stayDetermineMoney: '',
firstCost: '',
firstRebate: '',
surplusRebate: '',
secondaryUploadDate: '',
secondaryUploadMoney: '',
secondCost: '',
secondRebate: '',
adjustmentMoney: ''
}
}
},
created() {
//
this.init()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
init() {
typeValues({ type: 'rebateType' }).then((res) => {
if (res.success) {
this.rebateType_list = res.data
}
})
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((resp) => {
if (resp.success) {
this.listQuery.params.createOrgSid = resp.data
brandDown({ useOrg: this.listQuery.params.createOrgSid }).then((res) => {
if (res.success) {
this.brand_list = res.data
}
})
this.getList()
}
})
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'doImport':
this.doImport()
break
case 'doDel':
this.doDel()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
handleSelectionChange(row) {
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
console.log('sids', this.sids)
},
//
getList() {
this.listLoading = true
req.listPage(this.listQuery).then((response) => {
console.log('列表查询结果:', response)
this.listLoading = false
if (response.success && response.data && response.data.total > 0) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
handleReset() {
this.listQuery = {
params: {
brandSid: '',
createOrgSid: '',
rebateTypeKey: '',
rebateName: '',
state: '',
createEndTime: '',
createStartTime: ''
},
current: 1,
size: 5,
total: 0
}
this.init()
},
UpNumber(e) {
e.target.value = e.target.value.replace(/[^\d]/g, '') // ."-"
e.target.value = e.target.value.replace(/^00/, '0') // 0
if (e.target.value.indexOf('.') < 0 && e.target.value !== '' && e.target.value !== '-') {
// 0102
console.log(e.target.value)
e.target.value = parseFloat(e.target.value)
}
},
changeIsAdjustment(row) {
if (row.isAdjustment === '是') {
if (row.uploadMoney === '') {
row.isAdjustment = ''
this.$message({ showClose: true, type: 'error', message: '上传金额不能为空' })
return
}
if (row.money === '') {
row.isAdjustment = ''
this.$message({ showClose: true, type: 'error', message: '费用不能为空' })
return
}
if (row.stayDetermineMoney === '') {
row.isAdjustment = ''
this.$message({ showClose: true, type: 'error', message: '待确定金额不能为空' })
return
}
if (row.uploadMoney !== '' && row.money !== '' && row.stayDetermineMoney !== '') {
row.adjustmentMoney = parseInt(row.uploadMoney) - parseInt(row.money) - parseInt(row.stayDetermineMoney) - parseInt(row.estimateRebate)
}
} else if (row.isAdjustment === '否') {
row.adjustmentMoney = 0
row.adjustmentRemarks = ''
}
},
adjustmentMoneyAdd() {
this.formobj.adjustmentMoney = parseInt(this.formobj.firstRebate - 0) + parseInt(this.formobj.secondRebate - 0) - parseInt(this.formobj.surplusRebate - 0)
return this.formobj.adjustmentMoney
},
handleSave() {
let aa = null
if (!this.checked) {
aa = {
sid: this.formobj.sid,
stayDetermineMoney: 0,
cost: this.formobj.firstCost,
secondaryUploadDate: '',
secondaryUploadMoney: 0,
adjustmentMoney: this.formobj.firstRebate
}
} else {
aa = {
sid: this.formobj.sid,
stayDetermineMoney: 0,
cost: parseInt(this.formobj.firstCost) + parseInt(this.formobj.secondCost),
secondaryUploadDate: this.formobj.secondaryUploadDate,
secondaryUploadMoney: this.formobj.secondaryUploadMoney,
adjustmentMoney: this.formobj.adjustmentMoney
}
}
req.adjustment(aa).then((resp) => {
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: '保存成功' })
this.getList()
this.handleReturn()
}
})
},
handleReturn() {
this.dialogVisible = false
this.formobj = {
sid: '',
stayDetermineMoney: '',
firstCost: '',
firstRebate: '',
surplusRebate: '',
secondaryUploadDate: '',
secondaryUploadMoney: '',
secondCost: '',
secondRebate: '',
adjustmentMoney: ''
}
this.checked = false
},
handleClick() {
this.viewState = 2
this.$refs['divCheck'].init()
},
toAdd() {
this.viewState = 3
this.$refs['divCheckAdd'].showAdd(this.listQuery.params.createOrgSid)
},
toSave(row) {
if (row.uploadDate === '') {
this.$message({ showClose: true, type: 'error', message: '上传日期不能为空' })
return
}
if (row.uploadMoney === '') {
this.$message({ showClose: true, type: 'error', message: '上传金额不能为空' })
return
}
if (row.stayDetermineMoney === '') {
this.$message({ showClose: true, type: 'error', message: '待确定金额不能为空' })
return
}
if (row.money === '') {
this.$message({ showClose: true, type: 'error', message: '费用不能为空' })
return
}
if (row.stayDetermineMoney !== '0') {
if (row.isAdjustment === '是') {
this.$message({ showClose: true, type: 'error', message: '因待确定金额大于0,是否调整选项需选择否' })
return
}
} else if (row.stayDetermineMoney === '0') {
if (row.adjustmentMoney.toString().indexOf('-') !== -1) {
if (row.isAdjustment === '是') {
this.$message({ showClose: true, type: 'error', message: '因待确定金额等于0且调整金额小于0,是否调整选项需选择否' })
return
}
} else if (row.adjustmentMoney !== '0') {
if (row.isAdjustment === '否') {
if ((parseInt(row.uploadMoney) - parseInt(row.estimateRebate)) > 0) {
this.$message({ showClose: true, type: 'error', message: '因待确定金额等于0且调整金额大于0,是否调整选项需选择是' })
return
}
}
} else if (row.adjustmentMoney === '0') {
if (row.isAdjustment === '否') {
this.$message({ showClose: true, type: 'error', message: '因待确定金额等于0且调整金额等于0,是否调整选项需选择是' })
return
}
}
}
if (row.isAdjustment === '是') {
if (row.adjustmentMoney === '') {
this.$message({ showClose: true, type: 'error', message: '调整金额不能为空' })
return
}
if (row.adjustmentRemarks === '') {
this.$message({ showClose: true, type: 'error', message: '调整说明不能为空' })
return
}
}
req.updateDate(row).then((resp) => {
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: '保存成功' })
this.getList()
}
})
},
toInfo(row) {
this.viewState = 4
this.$refs['divInfo'].showInfo(row)
},
toAdjust(row) {
this.dialogVisible = true
this.formobj.stayDetermineMoney = row.stayDetermineMoney
this.formobj.sid = row.sid
this.formobj.firstCost = 0
this.formobj.firstRebate = 0
this.formobj.secondCost = 0
this.formobj.secondRebate = 0
this.formobj.secondaryUploadMoney = 0
this.formobj.surplusRebate = parseInt(row.estimateRebate) - parseInt(row.uploadMoney)
},
doDel() {
if (this.sids.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' })
return
}
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.delete(this.sids).then(resp => {
if (resp.success) {
this.$message({ type: 'success', message: resp.msg, showClose: true })
}
this.getList()
loading.close()
}).catch(e => {
loading.close()
})
}).catch(() => {
})
},
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
.switch_btn {
padding: 15px 0 10px 0;
}
.btn_style {
background-color: #018ad2;
color: white;
font-weight: 600;
}
</style>

172
anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliheduiFlow/relation/specialrebatetobecheckedAdd.vue

@ -0,0 +1,172 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="danger" size="small" @click="handleDelete">删除</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="">
<el-form ref="form_obj" class="formadd">
<el-table :key="tableKey" :data="list" :index="index" border style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" align="center" width="50px"/>
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="品牌" align="center">
<template slot-scope="scope">
<span>{{ scope.row.brandName }}</span>
</template>
</el-table-column>
<el-table-column label="创建日期" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="返利类型" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.rebateTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="返利名称" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.rebateName }}</span>
</template>
</el-table-column>
<el-table-column label="预计返利" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.estimateRebate }}</span>
</template>
</el-table-column>
<el-table-column label="上传日期" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.uploadDate }}</span>
</template>
</el-table-column>
<el-table-column label="上传金额" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.uploadMoney }}</span>
</template>
</el-table-column>
<el-table-column label="待确定金额" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.stayDetermineMoney }}</span>
</template>
</el-table-column>
<el-table-column label="费用" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.money }}</span>
</template>
</el-table-column>
<el-table-column label="是否调整" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.isAdjustment }}</span>
</template>
</el-table-column>
<el-table-column label="调整金额" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.adjustmentMoney }}</span>
</template>
</el-table-column>
<el-table-column label="调整说明" align="center" width="300">
<template slot-scope="scope">
<span>{{ scope.row.adjustmentRemarks }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
<!--End 添加修改部分-->
</div>
</template>
<script>
import req from '@/api/specialrebate/specialrebatecheck'
export default {
name: 'specialrebatetobecheckedAdd',
data() {
return {
viewTitle: '',
index: 0,
tableKey: 0,
viewState: 1,
rebateType: '',
sids: [],
//
list: [],
rules: {},
submitdisabled: false
}
},
methods: {
handleSelectionChange(row) {
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
console.log('sids', this.sids)
},
showInfo(row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '专项返利核对审核申请明细'
this.rebateType = row.rebateTypeValue
console.log('编辑回显', row)
req.vehRebateWithDetails(row.specialRebateSids).then((resp) => {
this.list = resp.data
}).catch((e) => {
this.list = []
})
},
handleDelete() {
if (this.sids.length === 0) {
this.$message({
showClose: true,
type: 'error',
message: '请选择至少一条记录进行删除操作'
})
return
}
for (var i = 0; i < this.list.length; i++) {
for (var j = 0; j < this.sids.length; j++) {
if (this.list[i].sid === this.sids[j]) {
this.list.splice(i, 1)
}
}
}
},
// ===
handleReturn() {
//
const data_list = []
for (var i = 0; i < this.list.length; i++) {
data_list.push({
sid: this.list[i].sid,
rebateTypeValue: this.list[i].rebateTypeValue,
rebateTypeKey: this.list[i].rebateTypeKey,
withRebate: this.list[i].estimateRebate,
brandName: this.list[i].brandName,
brandSid: this.list[i].brandSid,
uploadMoney: this.list[i].uploadMoney,
stayDetermineMoney: this.list[i].stayDetermineMoney,
adjustmentMoney: this.list[i].adjustmentMoney,
money: this.list[i].money
})
}
this.$emit('backAdd', data_list, this.rebateType)
}
}
}
</script>
<style scoped>
</style>

130
anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliheduiFlow/relation/specialrebatetobecheckedInfo.vue

@ -0,0 +1,130 @@
<template>
<div class="app-container">
<div>
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="">
<el-form ref="form_obj" class="formadd">
<el-table :key="tableKey" :data="list" :index="index" border style="width: 100%">
<el-table-column fixed width="60px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="品牌" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.brandName }}</span>
</template>
</el-table-column>
<el-table-column label="创建日期" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="返利类型" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.rebateTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="返利名称" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.rebateName }}</span>
</template>
</el-table-column>
<el-table-column label="预计返利" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.estimateRebate }}</span>
</template>
</el-table-column>
<el-table-column label="上传日期" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.uploadDate }}</span>
</template>
</el-table-column>
<el-table-column label="上传金额" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.uploadMoney }}</span>
</template>
</el-table-column>
<el-table-column label="待确定金额" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.stayDetermineMoney }}</span>
</template>
</el-table-column>
<el-table-column label="费用" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.money }}</span>
</template>
</el-table-column>
<el-table-column label="是否调整" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.isAdjustment }}</span>
</template>
</el-table-column>
<el-table-column label="调整金额" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.adjustmentMoney }}</span>
</template>
</el-table-column>
<el-table-column label="调整说明" align="center" width="300">
<template slot-scope="scope">
<span>{{ scope.row.adjustmentRemarks }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
<!--End 添加修改部分-->
</div>
</template>
<script>
import req from '@/api/specialrebate/specialrebatecheck'
export default {
name: 'sepcialrebatetobecheckedInfo',
data() {
return {
viewTitle: '',
index: 0,
tableKey: 0,
viewState: 1,
sids: [],
//
list: [],
rules: {},
submitdisabled: false
}
},
methods: {
showInfo(row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '专项返利核对审核申请明细'
console.log('编辑回显', row)
req.vehRebateWithDetails(row.specialRebateSids).then((resp) => {
this.list = resp.data
}).catch((e) => {
this.list = []
})
},
// ===
handleReturn() {
//
this.list = []
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}
}
}
</script>
<style scoped>
</style>

330
anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliheduiFlow/relation/yiheduizhuanxiangfanli.vue

@ -0,0 +1,330 @@
<template>
<div class="app-container">
<!-- Start 列表页面 -->
<div>
<button-bar view-title="已上传专项返利列表" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div class="">
<!-- <div class="searchcon">-->
<!-- <el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>-->
<!-- <div v-show="isSearchShow" class="search">-->
<!-- <el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">-->
<!-- <el-form-item label="品牌">-->
<!-- <el-input v-model="listQuery.params.mainSid" placeholder="请输入车架号" clearable/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="车型">-->
<!-- <el-input v-model="listQuery.params.mainSid" placeholder="请输入车架号" clearable/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="车架号">-->
<!-- <el-input v-model="listQuery.params.mainSid" placeholder="请输入车架号" clearable/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="创建日期">-->
<!-- <el-date-picker v-model="listQuery.params.createStartTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>-->
<!-- <span style="padding: 0 8px"></span>-->
<!-- <el-date-picker v-model="listQuery.params.createEndTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="返利类型">-->
<!-- <el-input v-model="listQuery.params.mainSid" placeholder="请输入车架号" clearable/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="返利名称">-->
<!-- <el-input v-model="listQuery.params.mainSid" placeholder="请输入车架号" clearable/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="状态">-->
<!-- <el-input v-model="listQuery.params.mainSid" placeholder="请输入车架号" clearable/>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <div class="btn" style="text-align: center;">-->
<!-- <el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button>-->
<!-- <el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<div class="listtop">
<div class="tit">已上传专项返利列表</div>
</div>
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" align="center" width="50px"/>
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80px"/>
<el-table-column label="品牌" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.brandName }}</span>
</template>
</el-table-column>
<el-table-column label="创建日期" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="返利类型" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.rebateTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="返利名称" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.rebateName }}</span>
</template>
</el-table-column>
<el-table-column label="预计返利" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.estimateRebate }}</span>
</template>
</el-table-column>
<el-table-column label="上传日期" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.uploadDate }}</span>
</template>
</el-table-column>
<el-table-column label="上传金额" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.uploadMoney }}</span>
</template>
</el-table-column>
<el-table-column label="待确定金额" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.stayDetermineMoney }}</span>
</template>
</el-table-column>
<el-table-column label="费用" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.money }}</span>
</template>
</el-table-column>
<el-table-column label="是否调整" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.isAdjustment }}</span>
</template>
</el-table-column>
<el-table-column label="调整金额" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.adjustmentMoney }}</span>
</template>
</el-table-column>
<el-table-column label="调整说明" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.adjustmentRemarks }}</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/specialrebate/specialrebatecheck'
import Pagination from '@/components/pagination'
import ButtonBar from '@/components/ButtonBar'
export default {
name: 'yiheduizhuanxiangfanli',
components: {
Pagination,
ButtonBar
},
data() {
return {
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: '',
btnKey: 'doConfirm',
btnLabel: '确定'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
// -----------
tableKey: 0,
list: [],
sids: [],
sids_list: [],
FormLoading: false,
listLoading: false,
listQuery: {
params: {
brandSid: '',
createOrgSid: '',
sidList: []
},
current: 1,
size: 5,
total: 0
},
rules: {}
}
},
created() {
//
this.getList()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'doConfirm':
this.doConfirm()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
handleSelectionChange(row) {
var dateTime = ''
let date = new Date()
let year = date.getFullYear() //
let month = date.getMonth() + 1 //
dateTime = year + '年' + month + '月'
const aa = []
const bb = []
row.forEach((element) => {
if (element.withholdingDateCopy === dateTime) {
aa.push({
sid: element.sid,
rebateTypeValue: element.rebateTypeValue,
rebateTypeKey: element.rebateTypeKey,
withRebate: element.estimateRebate,
brandName: element.brandName,
brandSid: element.brandSid,
uploadMoney: element.uploadMoney,
stayDetermineMoney: element.stayDetermineMoney,
adjustmentMoney: element.adjustmentMoney,
money: element.money
})
} else {
bb.push({
sid: element.sid,
withholdingDate: element.withholdingDateCopy,
withRebate: element.estimateRebate,
uploadMoney: element.uploadMoney,
stayDetermineMoney: element.stayDetermineMoney,
adjustmentMoney: element.adjustmentMoney,
money: element.money
})
}
})
this.sids = aa
this.sids_list = bb
console.log('sids', this.sids, bb, 99999999)
},
//
getList() {
this.listLoading = true
req.checkApplyGetAlreadyUploadVehRebate(this.listQuery).then((response) => {
console.log('列表查询结果:', response)
this.listLoading = false
if (response.success && response.data && response.data.total > 0) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
showData(value, val, createOrgSid, brandSid) {
this.listQuery.params.createOrgSid = createOrgSid
this.listQuery.params.brandSid = brandSid
const aa = []
if (value.length > 0) {
for (var i = 0; i < value.length; i++) {
for (var j = 0; j < value[i].specialRebateSids.length; j++) {
aa.push(value[i].specialRebateSids[j])
}
}
}
const bb = []
if (val.length > 0) {
for (var k = 0; k < val.length; k++) {
for (var l = 0; l < val[k].specialRebateSids.length; l++) {
bb.push(val[k].specialRebateSids[l])
}
}
}
if (aa.length > 0 && bb.length > 0) {
this.listQuery.params.sidList = aa
for (var p = 0; p < bb.length; p++) {
this.listQuery.params.sidList.push(bb[p])
}
} else if (aa.length > 0 && bb.length === 0) {
this.listQuery.params.sidList = aa
} else if (aa.length === 0 && bb.length > 0) {
this.listQuery.params.sidList = bb
} else if (aa.length === 0 && bb.length === 0) {
this.listQuery.params.sidList = []
}
this.getList()
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
handleReset() {
this.listQuery = {
params: {
createBySid: '',
createEndTime: '',
createStartTime: ''
},
current: 1,
size: 5,
total: 0
}
this.getList()
},
doConfirm() {
if (this.sids.length > 0 || this.sids_list.length > 0) {
this.$emit('backData', this.sids, this.sids_list)
} else {
this.$notify({
title: '提示',
message: '请选择至少一条记录!',
type: 'error',
duration: 2000
})
}
},
doClose() {
this.$emit('doback')
}
}
}
</script>
<style scoped>
</style>

400
anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliheduiFlow/zhuanxiangfanliheduiDaiBanInfo.vue

@ -0,0 +1,400 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="primary" size="small" @click="openAgree('同意')"> </el-button>
<el-button type="danger" size="small" @click="openReject('驳回')"> </el-button>
<el-button type="danger" size="small" @click="openStop('终止')"> </el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="">
<div class="titwu"><span>专项返利核对审核申请</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd">
<el-row class="rowStyle">
<el-col :span="2" class="tleftb colOneStyle">
<span>品牌:</span>
</el-col>
<el-col :span="22" class="colOneStyle">
<el-form-item><span>{{ formobj.brandName }}</span></el-form-item>
</el-col>
</el-row>
<div class="title">
<div>本月各项返利核对情况</div>
</div>
<el-table :key="tableKey" :data="formobj.scmWhenSpecialrebateCheckapplydetailDetails" :index="index" border style="width: 100%">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="返利类型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.rebateTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.num }}</span>
</template>
</el-table-column>
<el-table-column label="预提金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.withRebate }}</span>
</template>
</el-table-column>
<el-table-column label="上传金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.uploadMoney }}</span>
</template>
</el-table-column>
<el-table-column label="待确认金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.stayDetermineMoney }}</span>
</template>
</el-table-column>
<el-table-column label="调整金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.adjustmentMoney }}</span>
</template>
</el-table-column>
<el-table-column label="费用" align="center">
<template slot-scope="scope">
<span>{{ scope.row.money }}</span>
</template>
</el-table-column>
<el-table-column label="明细" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="handleLook(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<div class="title">
<div>预提返利本月核对情况</div>
</div>
<el-table :key="lastSpecialrebateKey" :data="formobj.scmLastSpecialrebateCheckapplydetailDetails" :index="index" border style="width: 100%">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="预提年月" align="center">
<template slot-scope="scope">
<span>{{ scope.row.withholdingDate }}</span>
</template>
</el-table-column>
<el-table-column label="预提数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.withholdingAmount }}</span>
</template>
</el-table-column>
<el-table-column label="预提金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.withRebate }}</span>
</template>
</el-table-column>
<el-table-column label="上传数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.uploadAmount }}</span>
</template>
</el-table-column>
<el-table-column label="上传金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.uploadMoney }}</span>
</template>
</el-table-column>
<el-table-column label="待确认金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.stayDetermineMoney }}</span>
</template>
</el-table-column>
<el-table-column label="调整金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.adjustmentMoney }}</span>
</template>
</el-table-column>
<el-table-column label="费用" align="center">
<template slot-scope="scope">
<span>{{ scope.row.money }}</span>
</template>
</el-table-column>
<el-table-column label="未上传数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.notUploadedAmount }}</span>
</template>
</el-table-column>
<el-table-column label="未上传金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.notUploadedCost }}</span>
</template>
</el-table-column>
</el-table>
<el-row>
<el-col :span="2" class="tleftb">
<span>备注</span>
</el-col>
<el-col :span="22">
<el-form-item><span>{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
<!--End 添加修改部分-->
<specialrebatetobecheckedInfo v-show="viewState == 2" ref="divInfo" @doback="resetState"/>
<!-- 选择待办人 的弹出框-->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
<el-form class="formaddcopy02" >
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="24">
<div class="span-sty spanTwoWidth"><span>当前环节:</span></div>
<el-form-item><span class="addinputInfo addinputOne">{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item>
</el-col>
</el-row>
<el-row :class="{ rowClass:!currentLink }">
<el-col :span="24">
<div class="span-sty spanTwoWidth"><span>意见:</span></div>
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw addinputOne" clearable ></el-input></el-form-item>
</el-col>
</el-row>
<div style="text-align:center;margin-top: 20px;">
<el-button type="primary" size="mini" @click="reject"> </el-button>
<el-button type="info " size="mini" @click="nodeDialogVisible = false"> </el-button>
</div>
</el-form>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/specialrebate/specialrebatecheck'
import specialrebatetobecheckedInfo from './relation/specialrebatetobecheckedInfo'
export default {
name: 'specialrebatecheckInfo',
components: {
specialrebatetobecheckedInfo
},
data() {
return {
viewTitle: '',
index: 0,
tableKey: 0,
lastSpecialrebateKey: 1,
viewState: 1,
operation: '', //
dialogList: {
comment: ''
},
startTask: true,
current: {
taskDefKey: '',
taskName: '' //
},
nextNode: {}, //
nodeDialogVisible: false,
currentLink: true,
//
formobj: {},
rules: {},
submitdisabled: false,
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
this.current.taskDefKey = obj.taskDefKey
this.current.taskName = obj.taskName
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 450 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '专项返利核对审核申请详情'
console.log('编辑回显', sid)
req.fetchDetailsBySid(sid).then((resp) => {
this.formobj = resp.data
}).catch((e) => {
this.formobj = {}
})
},
handleLook(row) {
this.viewState = 2
this.$refs['divInfo'].showInfo(row)
},
resetState() {
this.viewState = 1
},
//
openAgree(val) {
this.operation = val
this.currentLink = true
this.dialogList.comment = '同意'
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey }).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openReject(val) {
this.operation = val
this.currentLink = true
this.dialogList.comment = ''
req.getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey }).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openStop(val) {
this.operation = val
this.currentLink = false
this.dialogList.comment = ''
this.nodeDialogVisible = true
},
reject() {
if (this.operation === '同意') {
this.handleAgree()
} else if (this.operation === '驳回') {
if (this.dialogList.comment === '') {
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' })
} else {
this.handleReject()
}
} else if (this.operation === '终止') {
if (this.dialogList.comment === '') {
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' })
} else {
this.handleStop()
}
}
},
/** 同意任务 */
handleAgree() {
this.linkByParameter.comment = this.dialogList.comment
req.complete(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 驳回任务 */
handleReject() {
this.linkByParameter.comment = this.dialogList.comment
req.reject(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 终止任务 */
handleStop() {
this.linkByParameter.comment = this.dialogList.comment
req.breakProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.titwu {
font-size: 28px;
text-align: center;
padding: 30px 0 20px 0;
}
.rowStyle {
border-left: 0px;
}
.colOneStyle {
border-right: 0px !important;
border-bottom: 0px !important;
}
.rowClass {
border-top: 1px solid #E0E3EB;
}
</style>

546
anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliheduiFlow/zhuanxiangfanliheduiEdit.vue

@ -0,0 +1,546 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="save()">保存
</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交
</el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="">
<div class="titwu"><span>{{ formobj.checkApply }}专项返利核对审核申请</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd">
<el-row class="rowStyle">
<el-col :span="2" class="tleftb colOneStyle">
<span>品牌:</span>
</el-col>
<el-col :span="4" class="colOneStyle">
<el-form-item>
<el-select :disabled="dialogStatus === 'edit'" v-model="formobj.brandName" placeholder="请选择" filterable clearable @change="changeBrand">
<el-option v-for="item in brand_list" :key="item.sid" :label="item.brandName" :value="item.brandName"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="18" class="tleftb colOneStyle">
<el-button size="small" type="primary" @click="handleSelect()">添加</el-button>
</el-col>
</el-row>
<div class="title">
<div>本月各项返利核对情况</div>
</div>
<el-table :key="tableKey" :data="formobj.scmWhenSpecialrebateCheckapplydetailDetails" :index="index" border style="width: 100%">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="返利类型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.rebateTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.num }}</span>
</template>
</el-table-column>
<el-table-column label="预提金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.withRebate }}</span>
</template>
</el-table-column>
<el-table-column label="上传金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.uploadMoney }}</span>
</template>
</el-table-column>
<el-table-column label="待确认金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.stayDetermineMoney }}</span>
</template>
</el-table-column>
<el-table-column label="调整金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.adjustmentMoney }}</span>
</template>
</el-table-column>
<el-table-column label="费用" align="center">
<template slot-scope="scope">
<span>{{ scope.row.money }}</span>
</template>
</el-table-column>
<el-table-column label="明细" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="handleLook(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<div class="divStyle">
<div>预提返利本月核对情况</div>
<el-button type="primary" size="mini" class="btntopblueline" @click="handleCheck">往月核对情况</el-button>
</div>
<el-table :key="lastSpecialrebateKey" :data="formobj.scmLastSpecialrebateCheckapplydetailDetails" border style="width: 100%">
<el-table-column label="预提年月" align="center">
<template slot-scope="scope">
<span>{{ scope.row.withholdingDate }}</span>
</template>
</el-table-column>
<el-table-column label="预提数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.withholdingAmount }}</span>
</template>
</el-table-column>
<el-table-column label="预提金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.withRebate }}</span>
</template>
</el-table-column>
<el-table-column label="上传数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.uploadAmount }}</span>
</template>
</el-table-column>
<el-table-column label="上传金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.uploadMoney }}</span>
</template>
</el-table-column>
<el-table-column label="待确认金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.stayDetermineMoney }}</span>
</template>
</el-table-column>
<el-table-column label="调整金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.adjustmentMoney }}</span>
</template>
</el-table-column>
<el-table-column label="费用" align="center">
<template slot-scope="scope">
<span>{{ scope.row.money }}</span>
</template>
</el-table-column>
<el-table-column label="未上传数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.notUploadedAmount }}</span>
</template>
</el-table-column>
<el-table-column label="未上传金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.notUploadedCost }}</span>
</template>
</el-table-column>
</el-table>
<el-row>
<el-col :span="2" class="tleftb">
<span>备注</span>
</el-col>
<el-col :span="22">
<el-form-item><el-input v-model="formobj.remarks" placeholder="" class="addinputw" clearable></el-input></el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
<!--End 添加修改部分-->
<yiheduizhuanxiangfanli v-show="viewState == 2" ref="divSelect" @backData="backData" @doback="resetState"/>
<specialrebatetobecheckedAdd v-show="viewState == 3" ref="divAdd" @backAdd="backAdd" @doback="resetState"/>
<el-dialog :visible.sync="dialogVisible" width="60%">
<div class="titwu"><span>往月核对情况</span></div>
<el-form class="formadd">
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="3" class="tleftb">
<span>月促政策</span>
</el-col>
<el-col :span="21">
<el-form-item><span>{{ summation }}</span></el-form-item>
</el-col>
</el-row>
<el-table :key="checkKey" :data="checkList" border width="100%">
<el-table-column label="计提月份" align="center">
<template slot-scope="scope">
<span>{{ scope.row.month }}</span>
</template>
</el-table-column>
<el-table-column label="计提" align="center">
<template slot-scope="scope">
<span>{{ scope.row.month }}</span>
</template>
</el-table-column>
<el-table-column label="上传" align="center">
<template slot-scope="scope">
<span>{{ scope.row.month }}</span>
</template>
</el-table-column>
<el-table-column label="未上传" align="center">
<template slot-scope="scope">
<span>{{ scope.row.month }}</span>
</template>
</el-table-column>
<el-table-column label="调整" align="center">
<template slot-scope="scope">
<span>{{ scope.row.month }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/specialrebate/specialrebatecheck'
import { fetchBySid, brandDown } from '@/api/cheliang/dictcommons'
import yiheduizhuanxiangfanli from './relation/yiheduizhuanxiangfanli'
import specialrebatetobecheckedAdd from './relation/specialrebatetobecheckedAdd'
export default {
name: 'zhuanxiangfanliheduiEdit',
components: {
yiheduizhuanxiangfanli,
specialrebatetobecheckedAdd
},
data() {
return {
viewTitle: '',
viewState: 1,
index: 0,
tableKey: 0,
lastSpecialrebateKey: 1,
checkKey: 2,
dialogVisible: false,
summation: '',
checkList: [],
dialogStatus: '',
brand_list: [],
//
formobj: {
sid: '',
createByName: '',
createBySid: '',
brandName: '',
brandSid: '',
checkApply: '',
createOrgName: '',
createOrgSid: '',
useOrgName: '',
useOrgSid: '',
remarks: '',
instanceId: '', // ID
taskId: '', // ID
scmWhenSpecialrebateCheckapplydetailDetails: [],
scmLastSpecialrebateCheckapplydetailDetails: []
},
rules: {},
submitdisabled: false
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 450 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.dialogStatus = 'edit'
this.viewTitle = '【编辑】专项返利核对审核申请'
console.log('编辑回显', sid)
req.fetchDetailsBySid(sid).then((resp) => {
this.formobj = resp.data
this.formobj.instanceId = resp.data.procInstId
}).catch((e) => {
this.formobj = {}
})
},
changeBrand(value) {
let bb = null
this.brand_list.forEach((e) => {
if (e.brandName === value) {
bb = {
name: e.brandName,
sid: e.sid
}
}
})
this.formobj.brandSid = bb.sid
},
//
handleSelect() {
if (this.formobj.brandName === '' || this.formobj.brandName === null || this.formobj.brandName === undefined) {
this.$message({ showClose: true, type: 'error', message: '请先选择品牌' })
return
}
this.viewState = 2
this.$refs['divSelect'].showData(this.formobj.scmWhenSpecialrebateCheckapplydetailDetails, this.formobj.scmLastSpecialrebateCheckapplydetailDetails, this.formobj.createOrgSid, this.formobj.brandSid)
},
backData(value, val) {
this.viewState = 1
if (value.length > 0) {
for (var i in value) {
let cval = value[i]
if (!this.formobj.scmWhenSpecialrebateCheckapplydetailDetails || this.formobj.scmWhenSpecialrebateCheckapplydetailDetails.length === 0) {
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails = []
}
let v = 0
for (var j in this.formobj.scmWhenSpecialrebateCheckapplydetailDetails) {
if (this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].rebateTypeValue === cval.rebateTypeValue) {
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].num = parseInt(this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].num) + parseInt(1)
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].withRebate = parseInt(this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].withRebate) + parseInt(cval.withRebate)
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].uploadMoney = parseInt(this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].uploadMoney) + parseInt(cval.uploadMoney)
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].stayDetermineMoney = parseInt(this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].stayDetermineMoney) + parseInt(cval.stayDetermineMoney)
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].adjustmentMoney = parseInt(this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].adjustmentMoney) + parseInt(cval.adjustmentMoney)
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].money = parseInt(this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].money) + parseInt(cval.money)
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[j].specialRebateSids.push(cval.sid)
v = 1
break
}
}
if (v === 0) {
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails.push({
rebateTypeKey: cval.rebateTypeKey,
rebateTypeValue: cval.rebateTypeValue,
num: 1,
withRebate: cval.withRebate,
brandName: cval.brandName,
brandSid: cval.brandSid,
uploadMoney: cval.uploadMoney,
stayDetermineMoney: cval.stayDetermineMoney,
adjustmentMoney: cval.adjustmentMoney,
money: cval.money,
specialRebateSids: [cval.sid],
sid: '',
mainSid: ''
})
}
}
} else {
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails = []
}
if (val.length > 0) {
for (var p in val) {
let bval = val[p]
if (!this.formobj.scmLastSpecialrebateCheckapplydetailDetails || this.formobj.scmLastSpecialrebateCheckapplydetailDetails.length === 0) {
this.formobj.scmLastSpecialrebateCheckapplydetailDetails = []
}
let v = 0
for (var l in this.formobj.scmLastSpecialrebateCheckapplydetailDetails) {
if (this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].withholdingDate === bval.withholdingDate) {
this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].withholdingAmount = parseInt(this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].withholdingAmount) + parseInt(1)
this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].uploadAmount = parseInt(this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].uploadAmount) + parseInt(1)
this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].withRebate = parseInt(this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].withRebate) + parseInt(bval.withRebate)
this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].uploadMoney = parseInt(this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].uploadMoney) + parseInt(bval.uploadMoney)
this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].stayDetermineMoney = parseInt(this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].stayDetermineMoney) + parseInt(bval.stayDetermineMoney)
this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].adjustmentMoney = parseInt(this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].adjustmentMoney) + parseInt(bval.adjustmentMoney)
this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].money = parseInt(this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].money) + parseInt(bval.money)
this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].specialRebateSids.push(bval.sid)
v = 1
break
}
}
if (v === 0) {
this.formobj.scmLastSpecialrebateCheckapplydetailDetails.push({
withholdingDate: bval.withholdingDate,
withholdingAmount: 1,
uploadAmount: 1,
withRebate: bval.withRebate,
uploadMoney: bval.uploadMoney,
stayDetermineMoney: bval.stayDetermineMoney,
adjustmentMoney: bval.adjustmentMoney,
money: bval.money,
notUploadedAmount: '',
notUploadedCost: '',
specialRebateSids: [bval.sid],
sid: '',
mainSid: ''
})
}
}
} else {
this.formobj.scmLastSpecialrebateCheckapplydetailDetails = []
}
},
//
dataDelete(index) {
this.formobj.baseVehinstallModpricedetails.splice(index, 1)
},
handleLook(row) {
this.viewState = 3
this.$refs['divAdd'].showInfo(row)
},
backAdd(value, rebateType) {
this.viewState = 1
const aa = []
if (value.length > 0) {
for (var i in value) {
let cval = value[i]
let v = 0
for (var j in aa) {
if (aa[j].rebateTypeValue === cval.rebateTypeValue) {
aa[j].num = parseInt(aa[j].num) + parseInt(1)
aa[j].withRebate = parseInt(aa[j].withRebate) + parseInt(cval.withRebate)
aa[j].uploadMoney = parseInt(aa[j].uploadMoney) + parseInt(cval.uploadMoney)
aa[j].stayDetermineMoney = parseInt(aa[j].stayDetermineMoney) + parseInt(cval.stayDetermineMoney)
aa[j].adjustmentMoney = parseInt(aa[j].adjustmentMoney) + parseInt(cval.adjustmentMoney)
aa[j].money = parseInt(aa[j].money) + parseInt(cval.money)
aa[j].specialRebateSids.push(cval.sid)
v = 1
break
}
}
if (v === 0) {
aa.push({
rebateTypeKey: cval.rebateTypeKey,
rebateTypeValue: cval.rebateTypeValue,
num: 1,
withRebate: cval.withRebate,
brandName: cval.brandName,
brandSid: cval.brandSid,
uploadMoney: cval.uploadMoney,
stayDetermineMoney: cval.stayDetermineMoney,
adjustmentMoney: cval.adjustmentMoney,
money: cval.money,
specialRebateSids: [cval.sid],
sid: '',
mainSid: ''
})
}
}
for (var k = 0; k < this.formobj.scmWhenSpecialrebateCheckapplydetailDetails.length; k++) {
if (this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[k].rebateTypeValue === rebateType) {
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[k].rebateTypeKey = aa[0].rebateTypeKey
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[k].rebateTypeValue = aa[0].rebateTypeValue
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[k].num = aa[0].num
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[k].withRebate = aa[0].withRebate
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[k].brandName = aa[0].brandName
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[k].brandSid = aa[0].brandSid
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[k].uploadMoney = aa[0].uploadMoney
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[k].stayDetermineMoney = aa[0].stayDetermineMoney
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[k].adjustmentMoney = aa[0].adjustmentMoney
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[k].money = aa[0].money
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[k].specialRebateSids = aa[0].specialRebateSids
break
}
}
} else if (value.length === 0) {
for (var l = 0; l < this.formobj.scmWhenSpecialrebateCheckapplydetailDetails.length; l++) {
if (this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[l].rebateTypeValue === rebateType) {
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails.splice(l, 1)
break
}
}
}
},
resetState() {
this.viewState = 1
},
handleCheck() {
this.dialogVisible = true
},
save() {
console.log(this.formobj)
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.save(this.formobj).then((resp) => {
this.submitdisabled = false
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
}).catch(() => {
this.submitdisabled = false
})
} else {
return false
}
})
},
submit() {
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.submitVehicleApply(this.formobj).then((resp) => {
this.submitdisabled = false
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
}).catch(() => {
this.submitdisabled = false
})
} else {
return false
}
})
}
}
}
</script>
<style scoped>
.divStyle {
padding: 7px;
font-weight: bold;
font-size: 16px;
background-color: #0294d7;
color: #ffffff;
text-align: left;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.titwu {
font-size: 28px;
text-align: center;
padding: 30px 0 20px 0;
}
.rowStyle {
border-left: 0px;
}
.colOneStyle {
border-right: 0px !important;
border-bottom: 0px !important;
}
</style>

276
anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliheduiFlow/zhuanxiangfanliheduiYiBanInfo.vue

@ -0,0 +1,276 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="">
<div class="titwu"><span>专项返利核对审核申请</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd">
<el-row class="rowStyle">
<el-col :span="2" class="tleftb colOneStyle">
<span>品牌:</span>
</el-col>
<el-col :span="22" class="colOneStyle">
<el-form-item><span>{{ formobj.brandName }}</span></el-form-item>
</el-col>
</el-row>
<div class="title">
<div>本月各项返利核对情况</div>
</div>
<el-table :key="tableKey" :data="formobj.scmWhenSpecialrebateCheckapplydetailDetails" :index="index" border style="width: 100%">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="返利类型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.rebateTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.num }}</span>
</template>
</el-table-column>
<el-table-column label="预提金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.withRebate }}</span>
</template>
</el-table-column>
<el-table-column label="上传金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.uploadMoney }}</span>
</template>
</el-table-column>
<el-table-column label="待确认金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.stayDetermineMoney }}</span>
</template>
</el-table-column>
<el-table-column label="调整金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.adjustmentMoney }}</span>
</template>
</el-table-column>
<el-table-column label="费用" align="center">
<template slot-scope="scope">
<span>{{ scope.row.money }}</span>
</template>
</el-table-column>
<el-table-column label="明细" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="handleLook(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<div class="title">
<div>预提返利本月核对情况</div>
</div>
<el-table :key="lastSpecialrebateKey" :data="formobj.scmLastSpecialrebateCheckapplydetailDetails" :index="index" border style="width: 100%">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="预提年月" align="center">
<template slot-scope="scope">
<span>{{ scope.row.withholdingDate }}</span>
</template>
</el-table-column>
<el-table-column label="预提数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.withholdingAmount }}</span>
</template>
</el-table-column>
<el-table-column label="预提金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.withRebate }}</span>
</template>
</el-table-column>
<el-table-column label="上传数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.uploadAmount }}</span>
</template>
</el-table-column>
<el-table-column label="上传金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.uploadMoney }}</span>
</template>
</el-table-column>
<el-table-column label="待确认金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.stayDetermineMoney }}</span>
</template>
</el-table-column>
<el-table-column label="调整金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.adjustmentMoney }}</span>
</template>
</el-table-column>
<el-table-column label="费用" align="center">
<template slot-scope="scope">
<span>{{ scope.row.money }}</span>
</template>
</el-table-column>
<el-table-column label="未上传数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.notUploadedAmount }}</span>
</template>
</el-table-column>
<el-table-column label="未上传金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.notUploadedCost }}</span>
</template>
</el-table-column>
</el-table>
<el-row>
<el-col :span="2" class="tleftb">
<span>备注</span>
</el-col>
<el-col :span="22">
<el-form-item><span>{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
<!--End 添加修改部分-->
<specialrebatetobecheckedInfo v-show="viewState == 2" ref="divInfo" @doback="resetState"/>
</div>
</template>
<script>
import req from '@/api/specialrebate/specialrebatecheck'
import specialrebatetobecheckedInfo from './relation/specialrebatetobecheckedInfo'
export default {
name: 'zhuanxiangfanliheduiYiBanInfo',
components: {
specialrebatetobecheckedInfo
},
data() {
return {
viewTitle: '',
index: 0,
tableKey: 0,
lastSpecialrebateKey: 1,
viewState: 1,
//
formobj: {},
rules: {},
submitdisabled: false,
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 450 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '专项返利核对审核申请详情'
console.log('编辑回显', sid)
req.fetchDetailsBySid(sid).then((resp) => {
this.formobj = resp.data
}).catch((e) => {
this.formobj = {}
})
},
handleLook(row) {
this.viewState = 2
this.$refs['divInfo'].showInfo(row)
},
resetState() {
this.viewState = 1
},
/** 确认撤回任务 */
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRevoke()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤回'
})
})
},
/** 撤回任务 */
handleRevoke() {
req.revokeProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.titwu {
font-size: 28px;
text-align: center;
padding: 30px 0 20px 0;
}
.rowStyle {
border-left: 0px;
}
.colOneStyle {
border-right: 0px !important;
border-bottom: 0px !important;
}
</style>

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

@ -347,7 +347,7 @@ export default {
mounted() {
this.getOrgTree()
// this.getStaff()
this.getStaff2()
// this.getStaff2()
// this.getPageList()
},
methods: {
@ -417,11 +417,11 @@ export default {
this.form.address = data.orgAddress || data.address
this.form.dlxx = data.gisInfo || data.dlxx
this.getStaff(data.sid)
this.getStaff2()
this.getStaff2(data.sid)
},
editRow(row) {
this.getStaff(row.sid)
this.getStaff2()
this.getStaff2(row.sid)
this.dialogTitle = '编辑'
this.isshow = 'edit'
selectBySid(row.sid).then((response) => {
@ -456,7 +456,7 @@ export default {
},
deit(data) { //
this.getStaff(data.sid)
this.getStaff2()
this.getStaff2(data.sid)
console.log(data, 8888)
this.dialogVisible = true
// this.form = Object.assign({}, data)
@ -541,8 +541,8 @@ export default {
// console.log('name:', this.temp.payType, 'key:', this.temp.payTypeKey)
},
//
getStaff2() {
getStaffName().then(res => {
getStaff2(orgSid) {
getStaffName({ deptSid: orgSid }).then(res => {
this.staffdata2 = res.data
console.log('分管人员', this.staffdata2)
})

3
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/scmvehiclegression/AppGressionDetailsVo.java

@ -113,4 +113,7 @@ public class AppGressionDetailsVo implements Vo {
@ApiModelProperty("现场照片")
private List<String> image;
@ApiModelProperty("车架号")
private List<VehicleGressionVehVo> scmVehicleGressionVehs;
}

55
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/scmvehiclegression/AppGressionDto.java

@ -21,6 +21,9 @@ public class AppGressionDto implements Dto {
@ApiModelProperty("流程实例id")
private String procInsId;*/
@ApiModelProperty("车架号")
private List<VehicleGressionVehDto> scmVehicleGressionVehs;
@ApiModelProperty("用户sid")
private String userSid;
@ -28,13 +31,13 @@ public class AppGressionDto implements Dto {
@JsonProperty("applyId")
private String applicantNo;
@ApiModelProperty("申请人名称")
@JsonProperty("applyNmae")
private String applicantName;
@ApiModelProperty("申请日期")
@JsonProperty("applyDate")
private String applicantDate;
// @ApiModelProperty("申请人名称")
// @JsonProperty("applyNmae")
// private String applicantName;
//
// @ApiModelProperty("申请日期")
// @JsonProperty("applyDate")
// private String applicantDate;
@ApiModelProperty("现存放地点")
@JsonProperty("nowAddress")
@ -48,12 +51,12 @@ public class AppGressionDto implements Dto {
@JsonProperty("nowAddressSid")
private String locationSid;
@ApiModelProperty("车架号")
@JsonProperty("vin")
private String vinNo;
@ApiModelProperty("车架号")
private List<String> vins;
// @ApiModelProperty("车架号")
// @JsonProperty("vin")
// private String vinNo;
//
// @ApiModelProperty("车架号")
// private List<String> vins;
@ApiModelProperty("目标库")
@JsonProperty("targetAddress")
@ -87,9 +90,9 @@ public class AppGressionDto implements Dto {
@JsonProperty("insuranceStateKey")
private String InsuranceStateKey;
@ApiModelProperty("保单照片")
@JsonProperty("policyImage")
private List<String> policyImage;
// @ApiModelProperty("保单照片")
// @JsonProperty("policyImage")
// private List<String> policyImage;
@ApiModelProperty("临牌状态")
private String proCardState;
@ -97,12 +100,12 @@ public class AppGressionDto implements Dto {
@ApiModelProperty("临牌状态")
private String proCardStateKey;
@ApiModelProperty("临牌")
@JsonProperty("proCard")
private String temporaryCard;
@ApiModelProperty("现场照片")
private List<String> image;
// @ApiModelProperty("临牌")
// @JsonProperty("proCard")
// private String temporaryCard;
//
// @ApiModelProperty("现场照片")
// private List<String> image;
@ApiModelProperty("现场地址")
private String address;
@ -110,4 +113,12 @@ public class AppGressionDto implements Dto {
@ApiModelProperty("经纬度")
@JsonProperty("addressCode")
private String locationCode;
@ApiModelProperty("调出方负责人名称")
@JsonProperty("personName")
private String staffName;
@ApiModelProperty("调出方负责人用户sid")
@JsonProperty("personSid")
private String personUserSid;
}

3
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/scmvehiclegression/AppGressionInfoVo.java

@ -53,6 +53,9 @@ public class AppGressionInfoVo implements Vo {
@ApiModelProperty("车架号")
private List<String> vins; // 车架号
@ApiModelProperty("车架号")
private List<VehicleGressionVehVo> scmVehicleGressionVehs;
@ApiModelProperty("目标库")
@JsonProperty("targetAddress")
private String targetLocation;

26
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/scmvehiclegression/VehicleGressionVehDto.java

@ -0,0 +1,26 @@
package com.yxt.anrui.terminal.api.supplychain.scmvehiclegression;
import com.yxt.common.core.dto.Dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class VehicleGressionVehDto implements Dto {
private static final long serialVersionUID = 1981618379783367050L;
private String sid; // sid
@ApiModelProperty("移位申请单sid")
private String mainSid; // 移位申请单sid
@ApiModelProperty("车辆sid")
private String vehSid; // 车辆sid
@ApiModelProperty("车架号")
private String vehVin; // 车架号
@ApiModelProperty("买断状态key")
private String settlementStatus; // 买断状态key
@ApiModelProperty("买断状态value")
private String settlementStatusValue; // 买断状态value
@ApiModelProperty("临时牌照号码")
private String temporaryCardNo; // 临时牌照号码
}

27
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/scmvehiclegression/VehicleGressionVehVo.java

@ -0,0 +1,27 @@
package com.yxt.anrui.terminal.api.supplychain.scmvehiclegression;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class VehicleGressionVehVo implements Vo {
private static final long serialVersionUID = 6115486403760079153L;
private String sid; // sid
@ApiModelProperty("移位申请单sid")
private String mainSid; // 移位申请单sid
@ApiModelProperty("车辆sid")
private String vehSid; // 车辆sid
@ApiModelProperty("车架号")
private String vehVin; // 车架号
@ApiModelProperty("买断状态key")
private String settlementStatus; // 买断状态key
@ApiModelProperty("买断状态value")
private String settlementStatusValue; // 买断状态value
@ApiModelProperty("临时牌照号码")
private String temporaryCardNo; // 临时牌照号码
}
Loading…
Cancel
Save