Browse Source

Merge remote-tracking branch 'origin/master'

master
fanzongzhe0036 4 months ago
parent
commit
7cf4b94ba1
  1. 17
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finpaymentapply/FinPaymentapplyService.java
  2. 2
      anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java
  3. 15
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgService.java
  4. 9
      anrui-riskcenter-ui/src/api/overduevehicle/overduevehicle.js
  5. 35
      anrui-riskcenter-ui/src/views/overduevehicle/overduevehicle.vue
  6. 38
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanbeoverdueveh/LoanBeOverdueVehExcelVo.java
  7. 9
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanbeoverdueveh/LoanBeOverdueVehMapper.java
  8. 247
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanbeoverdueveh/LoanBeOverdueVehMapper.xml
  9. 26
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanbeoverdueveh/LoanBeOverdueVehRest.java
  10. 101
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanbeoverdueveh/LoanBeOverdueVehService.java
  11. 48
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.xml
  12. 2
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatecheckapply/ScmSpecialrebateCheckapplyRest.java
  13. 52
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatecheckapply/ScmSpecialrebateCheckapplyService.java
  14. 2
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatedistribute/ScmSpecialrebatedistributeRest.java
  15. 67
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatedistribute/ScmSpecialrebatedistributeService.java
  16. 2
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewithapply/ScmSpecialRebateWithApplyRest.java
  17. 53
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewithapply/ScmSpecialRebateWithApplyService.java
  18. 2
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatecheckapply/ScmVehrebateCheckapplyRest.java
  19. 53
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatecheckapply/ScmVehrebateCheckapplyService.java
  20. 2
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyRest.java
  21. 54
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyService.java
  22. 9
      anrui-scm/anrui-scm-ui/src/api/cheliang/dictcommons.js
  23. 135
      anrui-scm/anrui-scm-ui/src/api/financialDiscount/financialDiscount.js
  24. 51
      anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js
  25. 352
      anrui-scm/anrui-scm-ui/src/views/financialDiscount/differenceManagement/differenceManagement.vue
  26. 436
      anrui-scm/anrui-scm-ui/src/views/financialDiscount/differenceManagement/differenceManagementAdd.vue
  27. 203
      anrui-scm/anrui-scm-ui/src/views/financialDiscount/differenceManagement/differenceManagementInfo.vue
  28. 227
      anrui-scm/anrui-scm-ui/src/views/financialDiscount/differenceManagement/relation/chooseAdjustment.vue
  29. 266
      anrui-scm/anrui-scm-ui/src/views/financialDiscount/differenceManagement/varianceDetail.vue
  30. 251
      anrui-scm/anrui-scm-ui/src/views/financialDiscount/differentialAdjustment/differentialAdjustment.vue
  31. 463
      anrui-scm/anrui-scm-ui/src/views/workFlow/chayitiaozhengFlow/differenceManagementDaiBan.vue
  32. 405
      anrui-scm/anrui-scm-ui/src/views/workFlow/chayitiaozhengFlow/differenceManagementEdit.vue
  33. 249
      anrui-scm/anrui-scm-ui/src/views/workFlow/chayitiaozhengFlow/differenceManagementYiBan.vue
  34. 227
      anrui-scm/anrui-scm-ui/src/views/workFlow/chayitiaozhengFlow/relation/chooseAdjustment.vue

17
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finpaymentapply/FinPaymentapplyService.java

@ -902,15 +902,28 @@ public class FinPaymentapplyService extends MybatisBaseService<FinPaymentapplyMa
FinPaymentapply finPaymentapply = fetchBySid(query.getBusinessSid());
String businessTaskId = finPaymentapply.getTaskId();
if (StringUtils.isNotBlank(businessTaskId)) {
if (businessTaskId.equals(query.getTaskId())) {
if (query.getUserSid().equals(finPaymentapply.getCreateBySid())) {
FlowTaskVo flowTaskVo = new FlowTaskVo();
BeanUtil.copyProperties(query, flowTaskVo);
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.breakProcess(flowTaskVo);
if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg());
}
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData()));
Map<String, Object> map = BeanUtil.beanToMap(resultBean.getData());
updateFlowFiled(map);
return rb.success().setData(resultBean.getData());
} else {
if (businessTaskId.equals(query.getTaskId())) {
FlowTaskVo flowTaskVo = new FlowTaskVo();
BeanUtil.copyProperties(query, flowTaskVo);
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.breakProcess(flowTaskVo);
if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg());
}
Map<String, Object> map = BeanUtil.beanToMap(resultBean.getData());
updateFlowFiled(map);
return rb.success().setData(resultBean.getData());
}
}
}
return rb.setMsg("操作失败!提交的数据不一致!");

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

@ -23,7 +23,7 @@ public enum ProcDefEnum {
// BASEVEHICLEACTUALSALES("未售买断", "process_6qx07b75:8:725012"),
BASEVEHICLEACTUALSALES("未售买断", "process_6qx07b75:9:4087504"),
FINCOSTAPPLY("费用申请", "process_u0pahv0s:6:725016"),
FINPAYAPPLY("付款申请", "process_gin2tntb:5:16412504"),
FINPAYAPPLY("付款申请", "process_gin2tntb:6:16692504"),
RECORDAPPLICATION("入库申请", "process_xbwq2c7p:5:1742504"),
SCMVEHICLERETURN("采购退库", "process_md8aeoap:2:722508"),
SEALAPPLY("盖章申请", "process_7h0z66tp:1:240064"),

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

@ -344,16 +344,15 @@ public class SysStaffOrgService extends MybatisBaseService<SysStaffOrgMapper, Sy
public ResultBean<OrgVo> getOrgByPath(String orgSidPath) {
ResultBean<OrgVo> rb = ResultBean.fireFail();
OrgVo orgVo = new OrgVo();
List<String> stringList = Arrays.asList(orgSidPath.split("/"));
//根据orgSidPath查询该组织的层级
SysOrganization sysOrganization = baseMapper.selectOrgSidPath(orgSidPath);
if ("1".equals(sysOrganization.getOrgLevelKey())) {
sysOrganization = sysOrganizationService.fetchBySid(stringList.get(0));
} else if ("2".equals(sysOrganization.getOrgLevelKey())) {
sysOrganization = sysOrganizationService.fetchBySid(stringList.get(1));
String[] levels = orgSidPath.split("/"); // 将orgSidPath按'/'分割
String orgSid = "";
// 判断层级
if (levels.length > 3) {
orgSid = levels[2]; // 第三层级的sid
} else {
sysOrganization = sysOrganizationService.fetchBySid(stringList.get(2));
orgSid = levels[levels.length - 2]; // 倒数第二层级的sid
}
SysOrganization sysOrganization = sysOrganizationService.fetchBySid(orgSid);
orgVo.setUseOrgName(sysOrganization.getName());
orgVo.setUseOrgSid(sysOrganization.getSid());
orgVo.setOrgCode(sysOrganization.getOrgCode());

9
anrui-riskcenter-ui/src/api/overduevehicle/overduevehicle.js

@ -10,6 +10,15 @@ export default {
headers: { 'Content-Type': 'application/json' }
})
},
exportExcel(data) {
return request({
url: '/riskcenter/v1/Loanbeoverdueveh/excelList',
method: 'post',
responseType: 'blob', // 表明返回服务器返回的数据类型
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 风控专员--查看的逾期车辆列表
riskListPage: function(data) {
return request({

35
anrui-riskcenter-ui/src/views/overduevehicle/overduevehicle.vue

@ -158,6 +158,13 @@ export default {
btnKey: 'toAllot',
btnLabel: '分配风控人员'
},
{
type: 'primary',
size: 'small',
icon: 'export',
btnKey: 'doExport',
btnLabel: '导出'
},
{
type: 'info',
size: 'small',
@ -263,6 +270,9 @@ export default {
break
case 'toAllot':
this.toAllot()
case 'doExport':
this.doExport()
break
break
case 'doClose':
this.doClose()
@ -381,6 +391,31 @@ export default {
this.$message({ showClose: true, type: 'error', message: '请选择风控人员' })
}
},
doExport() {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.exportExcel(this.listQuery.params).then((resp) => {
loading.close()
const blob = new Blob([resp], {
type: 'application/vnd.ms-excel'
})
const fileName = '逾期车辆列表' + '.xls'
const elink = document.createElement('a')
elink.download = fileName
elink.style.display = 'nonde'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href)
document.body.removeChild(elink)
}).catch(() => {
loading.close()
})
},
resetState() {
this.viewState = 1
},

38
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanbeoverdueveh/LoanBeOverdueVehExcelVo.java

@ -0,0 +1,38 @@
package com.yxt.anrui.riskcenter.api.loanbeoverdueveh;
import com.yxt.common.core.utils.ExportEntityMap;
import com.yxt.common.core.vo.Vo;
import lombok.Data;
@Data
public class LoanBeOverdueVehExcelVo {
@ExportEntityMap(CnName = "序号", EnName = "rankNo")
private Integer rankNo;
@ExportEntityMap(CnName = "分公司", EnName = "useOrgName")
private String useOrgName;
@ExportEntityMap(CnName = "销售部门", EnName = "dept")
private String dept;
@ExportEntityMap(CnName = "贷款合同编号", EnName = "loanContractNo")
private String loanContractNo;
@ExportEntityMap(CnName = "车架号", EnName = "vinNo")
private String vinNo;
@ExportEntityMap(CnName = "车牌号", EnName = "carNum")
private String carNum;
@ExportEntityMap(CnName = "贷款人", EnName = "borrowerName")
private String borrowerName;
@ExportEntityMap(CnName = "还款操作人", EnName = "repaymentName")
private String repaymentName;
@ExportEntityMap(CnName = "逾期期数", EnName = "beOverduePeriod")
private String beOverduePeriod;
@ExportEntityMap(CnName = "逾期金额", EnName = "beOverdueMoney")
private String beOverdueMoney;
@ExportEntityMap(CnName = "换算期数", EnName = "beOverdueMoneyAndPeriod")
private String beOverdueMoneyAndPeriod;
@ExportEntityMap(CnName = "最近催收日期", EnName = "createTime")
private String createTime;
@ExportEntityMap(CnName = "风控专员", EnName = "riskStaffUserName")
private String riskStaffUserName;
@ExportEntityMap(CnName = "远程控制状态", EnName = "lockCarState")
private String lockCarState;
}

9
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanbeoverdueveh/LoanBeOverdueVehMapper.java

@ -1,18 +1,15 @@
package com.yxt.anrui.riskcenter.biz.loanbeoverdueveh;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.yxt.anrui.riskcenter.api.loanbecollectionrecord.LoanBeCollectionRecordVehInit;
import com.yxt.anrui.riskcenter.api.loanbeoverdueveh.LoanBeOverdueVehExcelVo;
import com.yxt.anrui.riskcenter.api.loanbeoverdueveh.LoanBeOverdueVehVo;
import com.yxt.anrui.riskcenter.api.loanbeoverdueveh.ReaRepaymentVo;
import com.yxt.anrui.riskcenter.api.loanborrower.AppLoanBorrowerListVo;
import com.yxt.anrui.riskcenter.api.loanborrower.LoanBorrower;
import com.yxt.anrui.riskcenter.api.loanborrower.LoanBorrowerVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@ -26,4 +23,6 @@ public interface LoanBeOverdueVehMapper {
List<LoanBeCollectionRecordVehInit> initVehListByBorrSid(String borrowerSid);
ReaRepaymentVo initReaRepayment(String saleVehSid);
List<LoanBeOverdueVehExcelVo> excelList(@Param(Constants.WRAPPER) QueryWrapper<LoanBeOverdueVehVo> qw);
}

247
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanbeoverdueveh/LoanBeOverdueVehMapper.xml

@ -7,21 +7,21 @@
<select id="selectPageVo" resultType="com.yxt.anrui.riskcenter.api.loanbeoverdueveh.LoanBeOverdueVehVo">
SELECT
a1.busVinSid AS saleVehSid,
a1.`useOrgName`,
a1.`dept`,
a1.`loanContractNo`,
a1.useOrgName,
a1.dept,
a1.loanContractNo,
a1.borrowerName,
RIGHT(a1.vinNo, 8) AS vinNo,
a1.vehMark AS carNum,
a1.`bankName`,
a1.`bankContractNo`,
a1.bankName,
a1.bankContractNo,
a1.dueMoney AS bankMonthRep,
a1.dueDate AS firstBeDate,
COUNT(a1.sid) AS beOverduePeriod,
(
SUM(a1.yq_total) + IFNULL(
(SELECT
SUM(lbpv.`bankBeInter`)
SUM(lbpv.bankBeInter)
FROM
loan_be_padsincere_veh lbpv
WHERE lbpv.saleVehSid = a1.busVinSid),
@ -44,7 +44,7 @@
(
SUM(a1.yq_total) + IFNULL(
(SELECT
SUM(lbpv.`bankBeInter`)
SUM(lbpv.bankBeInter)
FROM
loan_be_padsincere_veh lbpv
WHERE lbpv.saleVehSid = a1.busVinSid),
@ -77,26 +77,26 @@
(SELECT
lrpd.sid,
lrpd.busVinSid,
lrpd.`useOrgName`,
lrpd.`dept`,
lrpd.`loanContractNo`,
lrpd.useOrgName,
lrpd.dept,
lrpd.loanContractNo,
lrpd.borrowerName,
lrpd.`vinNo`,
lrpd.`vehMark`,
lrpd.`bankName`,
lrpd.`bankContractNo`,
lrpd.vinNo,
lrpd.vehMark,
lrpd.bankName,
lrpd.bankContractNo,
lrpd.dueMoney,
lrpd.dueDate,
(
IFNULL(lrs.mainMidRepay, 0) + IFNULL(lrs.otherMidRepay, 0)
) AS qjyh,
(
lrpd.`dueMoney` - SUM(IFNULL(lrh.actualMoney, 0))
lrpd.dueMoney - SUM(IFNULL(lrh.actualMoney, 0))
) AS yq_total,
(
lrpd.`dueMoney` - SUM(IFNULL(lrh.actualMoney, 0))
) / lrpd.`dueMoney` AS yq_hsqs,
lrpd.`paymentMoney` AS yd_dkje,
lrpd.dueMoney - SUM(IFNULL(lrh.actualMoney, 0))
) / lrpd.dueMoney AS yq_hsqs,
lrpd.paymentMoney AS yd_dkje,
lrpd.fund AS yd_zjzyf,
lrpd.orgSidPath,
lrpd.createBySid,
@ -126,10 +126,10 @@
ORDER BY lbca.createTime DESC
LIMIT 1) AS lockCarState
FROM
`loan_repayment_plan_details` lrpd
LEFT JOIN `loan_repayment_history` lrh
ON lrh.planDetailSid = lrpd.`sid`
LEFT JOIN anrui_buscenter.`bus_sales_order_vehicle` bv
loan_repayment_plan_details lrpd
LEFT JOIN loan_repayment_history lrh
ON lrh.planDetailSid = lrpd.sid
LEFT JOIN anrui_buscenter.bus_sales_order_vehicle bv
ON lrpd.busVinSid = bv.sid
LEFT JOIN loan_repayment_schedule lrs
ON lrpd.scheduleSid = lrs.sid
@ -142,7 +142,7 @@
ORDER BY createTime DESC) lr
ON lrpd.busVinSid = lr.saleVehSid
WHERE DATE_FORMAT(lrpd.dueDate, '%Y-%m-%d') &lt; CURDATE()
GROUP BY lrpd.`sid`
GROUP BY lrpd.sid
HAVING (yq_total > 0)) a1
<where>
${ew.sqlSegment}
@ -151,7 +151,7 @@
<update id="allocationRiskStaff">
UPDATE
anrui_buscenter.`bus_sales_order_vehicle`
anrui_buscenter.bus_sales_order_vehicle
SET riskStaffUserSid = #{userSid},
riskStaffUserName = #{userName}
WHERE sid = #{saleVehSid}
@ -163,9 +163,9 @@
RIGHT (a1.vinNo, 8) AS vinNo,
a1.customer AS custName,
a1.mobile AS custPhone,
a1.`loanContractNo`,
a1.loanContractNo,
a1.bankContractNo,
a1.`bankName`,
a1.bankName,
a1.borrowerName AS loanName,
a1.vehMark AS carNum,
a1.dueDate AS firstBeDate,
@ -173,7 +173,7 @@
(
SUM(a1.yq_total) + IFNULL(
(SELECT
SUM(lbpv.`bankBeInter`)
SUM(lbpv.bankBeInter)
FROM
loan_be_padsincere_veh lbpv
WHERE lbpv.saleVehSid = a1.busVinSid),
@ -195,7 +195,7 @@
ROUND((
SUM(a1.yq_total) + IFNULL(
(SELECT
SUM(lbpv.`bankBeInter`)
SUM(lbpv.bankBeInter)
FROM
loan_be_padsincere_veh lbpv
WHERE lbpv.saleVehSid = a1.busVinSid),
@ -221,21 +221,21 @@
(SELECT
lrpd.sid,
lrpd.busVinSid,
lrpd.`loanContractNo`,
lrpd.`bankContractNo`,
lrpd.`vinNo`,
lrpd.`bankName`,
lrpd.loanContractNo,
lrpd.bankContractNo,
lrpd.vinNo,
lrpd.bankName,
lrpd.borrowerName,
lrpd.dueDate,
lrpd.vehMark,
lrpd.dueMoney,
(IFNULL(lrs.mainMidRepay,0) + IFNULL(lrs.otherMidRepay,0)) AS qjyh,
(
lrpd.`dueMoney` - SUM(IFNULL(lrh.actualMoney, 0))
lrpd.dueMoney - SUM(IFNULL(lrh.actualMoney, 0))
) AS yq_total,
(
lrpd.`dueMoney` - SUM(IFNULL(lrh.actualMoney, 0))
) / lrpd.`dueMoney` AS yq_hsqs,
lrpd.dueMoney - SUM(IFNULL(lrh.actualMoney, 0))
) / lrpd.dueMoney AS yq_hsqs,
lrpd.customer,
ct.mobile,
lr.createTime,
@ -263,10 +263,10 @@
ORDER BY lbca.createTime DESC
LIMIT 1) AS lockCarState
FROM
`loan_repayment_plan_details` lrpd
LEFT JOIN `loan_repayment_history` lrh
ON lrh.planDetailSid = lrpd.`sid`
LEFT JOIN anrui_buscenter.`bus_sales_order_vehicle` bv
loan_repayment_plan_details lrpd
LEFT JOIN loan_repayment_history lrh
ON lrh.planDetailSid = lrpd.sid
LEFT JOIN anrui_buscenter.bus_sales_order_vehicle bv
ON lrpd.busVinSid = bv.sid
LEFT JOIN loan_repayment_schedule lrs
ON lrpd.scheduleSid = lrs.sid
@ -279,10 +279,10 @@
ORDER BY createTime DESC
LIMIT 1) lr
ON lrpd.busVinSid = lr.saleVehSid
LEFT JOIN anrui_crm.`crm_customer_temp` ct
LEFT JOIN anrui_crm.crm_customer_temp ct
ON lrpd.customerSid = ct.sid
WHERE DATE_FORMAT(lrpd.dueDate, '%Y-%m-%d') &lt; CURDATE()
GROUP BY lrpd.`sid`
GROUP BY lrpd.sid
HAVING (yq_total > 0)) a1
WHERE a1.borrowerSid = #{borrowerSid}
GROUP BY a1.loanContractNo,
@ -291,16 +291,161 @@
</select>
<select id="initReaRepayment" resultType="com.yxt.anrui.riskcenter.api.loanbeoverdueveh.ReaRepaymentVo">
SELECT DISTINCT ld.`vinNo`,
ld.`vehMark` AS carNum,
ld.`customer` AS custName,
ld.`borrowerName` AS borrerName,
bv.`reaRepaymentName`,
bv.`reaRepaymentPhone`,
ld.`busVinSid` AS saleVehSid
SELECT DISTINCT ld.vinNo,
ld.vehMark AS carNum,
ld.customer AS custName,
ld.borrowerName AS borrerName,
bv.reaRepaymentName,
bv.reaRepaymentPhone,
ld.busVinSid AS saleVehSid
FROM loan_repayment_plan_details ld
LEFT JOIN anrui_buscenter.`bus_sales_order_vehicle` bv
ON ld.`busVinSid` = bv.`sid`
WHERE ld.`busVinSid` = #{saleVehSid}
LEFT JOIN anrui_buscenter.bus_sales_order_vehicle bv
ON ld.busVinSid = bv.sid
WHERE ld.busVinSid = #{saleVehSid}
</select>
<select id="excelList" resultType="com.yxt.anrui.riskcenter.api.loanbeoverdueveh.LoanBeOverdueVehExcelVo">
SELECT
a1.busVinSid AS saleVehSid,
a1.useOrgName,
a1.dept,
a1.loanContractNo,
a1.borrowerName,
RIGHT(a1.vinNo, 8) AS vinNo,
a1.vehMark AS carNum,
a1.bankName,
a1.bankContractNo,
a1.dueMoney AS bankMonthRep,
a1.dueDate AS firstBeDate,
COUNT(a1.sid) AS beOverduePeriod,
(
SUM(a1.yq_total) + IFNULL(
(SELECT
SUM(lbpv.bankBeInter)
FROM
loan_be_padsincere_veh lbpv
WHERE lbpv.saleVehSid = a1.busVinSid),
0
) + IFNULL(
(SELECT
SUM(fund)
FROM
loan_fund_day
WHERE busSid IN
(SELECT
lrpd.sid
FROM
loan_repayment_plan_details lrpd
WHERE DATE_FORMAT(lrpd.dueDate, '%Y-%m-%d') &lt; CURDATE())),
0
)
) AS beOverdueMoney,
ROUND(
(
SUM(a1.yq_total) + IFNULL(
(SELECT
SUM(lbpv.bankBeInter)
FROM
loan_be_padsincere_veh lbpv
WHERE lbpv.saleVehSid = a1.busVinSid),
0
) + IFNULL(
(SELECT
SUM(fund)
FROM
loan_fund_day
WHERE busSid IN
(SELECT
lrpd.sid
FROM
loan_repayment_plan_details lrpd
WHERE DATE_FORMAT(lrpd.dueDate, '%Y-%m-%d') &lt; CURDATE())),
0
)
) / a1.qjyh,
1
) AS beOverdueMoneyAndPeriod,
SUM(a1.yd_dkje) AS advMoney,
SUM(a1.yd_zjzyf) AS fundPossCostMoney,
a1.riskStaffUserSid,
a1.riskStaffUserName,
a1.reaRepaymentName AS repaymentName,
a1.createTime,
a1.orgSidPath,
a1.lockCarState
FROM
(SELECT
lrpd.sid,
lrpd.busVinSid,
lrpd.useOrgName,
lrpd.dept,
lrpd.loanContractNo,
lrpd.borrowerName,
lrpd.vinNo,
lrpd.vehMark,
lrpd.bankName,
lrpd.bankContractNo,
lrpd.dueMoney,
lrpd.dueDate,
(
IFNULL(lrs.mainMidRepay, 0) + IFNULL(lrs.otherMidRepay, 0)
) AS qjyh,
(
lrpd.dueMoney - SUM(IFNULL(lrh.actualMoney, 0))
) AS yq_total,
(
lrpd.dueMoney - SUM(IFNULL(lrh.actualMoney, 0))
) / lrpd.dueMoney AS yq_hsqs,
lrpd.paymentMoney AS yd_dkje,
lrpd.fund AS yd_zjzyf,
lrpd.orgSidPath,
lrpd.createBySid,
bv.riskStaffUserSid,
bv.riskStaffUserName,
bv.reaRepaymentName,
lr.createTime,
(SELECT
CASE
lbcv.lockCarState
WHEN 0
THEN '未控制'
WHEN 1
THEN '控制成功'
WHEN 2
THEN '控制失败'
WHEN 3
THEN '已解控'
END AS lockCarState
FROM
loan_be_collection_veh lbcv
LEFT JOIN loan_be_collection_apply lbca
ON lbca.sid = lbcv.mainSid
WHERE lbca.collMeasure LIKE '%远程控制%'
AND lbca.nodeState = '已办结'
AND lbcv.saleVehSid = lrpd.busVinSid
ORDER BY lbca.createTime DESC
LIMIT 1) AS lockCarState
FROM
loan_repayment_plan_details lrpd
LEFT JOIN loan_repayment_history lrh
ON lrh.planDetailSid = lrpd.sid
LEFT JOIN anrui_buscenter.bus_sales_order_vehicle bv
ON lrpd.busVinSid = bv.sid
LEFT JOIN loan_repayment_schedule lrs
ON lrpd.scheduleSid = lrs.sid
LEFT JOIN
(SELECT
saleVehSid,
createTime
FROM
loan_be_collection_record
ORDER BY createTime DESC) lr
ON lrpd.busVinSid = lr.saleVehSid
WHERE DATE_FORMAT(lrpd.dueDate, '%Y-%m-%d') &lt; CURDATE()
GROUP BY lrpd.sid
HAVING (yq_total > 0)) a1
<where>
${ew.sqlSegment}
</where>
</select>
</mapper>

26
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanbeoverdueveh/LoanBeOverdueVehRest.java

@ -1,15 +1,21 @@
package com.yxt.anrui.riskcenter.biz.loanbeoverdueveh;
import com.yxt.anrui.riskcenter.api.loanbeoverdueveh.*;
import com.yxt.anrui.riskcenter.api.loanborrower.*;
import com.yxt.common.base.utils.ExportExcelUtils;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.List;
@Api(tags = "逾期车辆列表")
@ -19,6 +25,8 @@ public class LoanBeOverdueVehRest implements LoanBeOverdueVehFegin {
@Autowired
private LoanBeOverdueVehService loanBeOverdueVehService;
@Autowired
private HttpServletResponse response;
@Override
public ResultBean<PagerVo<LoanBeOverdueVehVo>> listPage(PagerQuery<LoanBeOverdueVehQuery> pq) {
@ -27,6 +35,22 @@ public class LoanBeOverdueVehRest implements LoanBeOverdueVehFegin {
return rb.success().setData(pv);
}
@ApiOperation("导出")
@PostMapping("/excelList")
public void excelList(@RequestBody LoanBeOverdueVehQuery query) {
//得到所有要导出的数据
List<LoanBeOverdueVehExcelVo> exportVoList = loanBeOverdueVehService.excelList(query);
//定义导出的excel名字
String excelName = "逾期车辆列表";
String fileNameURL = "";
try {
fileNameURL = URLEncoder.encode(excelName, "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
ExportExcelUtils.export(fileNameURL, exportVoList, LoanBeOverdueVehExcelVo.class, response);
}
@Override
public ResultBean<PagerVo<LoanBeOverdueVehVo>> riskListPage(PagerQuery<LoanBeOverdueVehQuery> pq) {
ResultBean rb = ResultBean.fireFail();

101
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanbeoverdueveh/LoanBeOverdueVehService.java

@ -3,7 +3,6 @@ package com.yxt.anrui.riskcenter.biz.loanbeoverdueveh;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicleFeign;
import com.yxt.anrui.buscenter.api.bussalesvehicle.BusSalesVehicleFeign;
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserVo;
@ -17,6 +16,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
@Service
@ -205,4 +205,103 @@ public class LoanBeOverdueVehService {
ReaRepaymentVo reaRepaymentVo = loanBeOverdueVehMapper.initReaRepayment(saleVehSid);
return reaRepaymentVo;
}
public List<LoanBeOverdueVehExcelVo> excelList(LoanBeOverdueVehQuery query) {
QueryWrapper<LoanBeOverdueVehVo> qw = new QueryWrapper<>();
//========================================数据授权开始
if (StringUtils.isNotBlank(query.getMenuUrl())) {
PrivilegeQuery privilegeQuery = new PrivilegeQuery();
privilegeQuery.setOrgPath(query.getOrgPath());
privilegeQuery.setMenuUrl(query.getMenuUrl());
privilegeQuery.setMenuSid(query.getMenuSid());
privilegeQuery.setUserSid(query.getUserSid());
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery);
if (StringUtils.isNotBlank(defaultIdReltBean.getData())) {
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
String orgSidPath = query.getOrgPath();
orgSidPath = orgSidPath + "/";
int i1 = orgSidPath.indexOf("/");
int i2 = orgSidPath.indexOf("/", i1 + 1);
int i3 = orgSidPath.indexOf("/", i2 + 1);
int i4 = orgSidPath.indexOf("/", i3 + 1);
String orgLevelKey = defaultIdReltBean.getData();
if ("1".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i1);
qw.like("a1.orgSidPath", orgSidPath);
} else if ("2".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i2);
qw.like("a1.orgSidPath", orgSidPath);
} else if ("3".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i3);
qw.like("a1.orgSidPath", orgSidPath);
} else if ("4".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i4);
qw.like("a1.orgSidPath", orgSidPath);
} else if ("5".equals(orgLevelKey)) {
qw.eq("a1.createBySid", query.getUserSid());
} else {
List<LoanBeOverdueVehExcelVo> loanBeOverdueVehExcelVoArrayList = new ArrayList<LoanBeOverdueVehExcelVo>();
return loanBeOverdueVehExcelVoArrayList;
}
} else {
List<LoanBeOverdueVehExcelVo> loanBeOverdueVehExcelVoArrayList = new ArrayList<LoanBeOverdueVehExcelVo>();
return loanBeOverdueVehExcelVoArrayList;
}
}
if (query.getIsFP()) {
qw.isNull("a1.riskStaffUserName");
}
if (StringUtils.isNotBlank(query.getUseOrgName())) {
qw.like("a1.useOrgName", query.getUseOrgName());
}
if (StringUtils.isNotBlank(query.getDept())) {
qw.like("a1.dept", query.getDept());
}
if (StringUtils.isNotBlank(query.getLoanContractNo())) {
qw.like("a1.loanContractNo", query.getLoanContractNo());
}
if (StringUtils.isNotBlank(query.getBorrowerName())) {
qw.like("a1.borrowerName", query.getBorrowerName());
}
if (StringUtils.isNotBlank(query.getRepaymentName())) {
qw.like("a1.reaRepaymentName", query.getRepaymentName());
}
if (StringUtils.isNotBlank(query.getCarNum())) {
qw.like("a1.vehMark", query.getCarNum());
}
if (StringUtils.isNotBlank(query.getBankName())) {
qw.like("a1.bankName", query.getBankName());
}
if (StringUtils.isNotBlank(query.getBankContractNo())) {
qw.like("a1.bankContractNo", query.getBankContractNo());
}
if (StringUtils.isNotBlank(query.getRiskStaffName())) {
qw.like("a1.riskStaffUserName", query.getRiskStaffName());
}
if (StringUtils.isNotBlank(query.getLockCarState())) {
qw.eq("a1.lockCarState", query.getLockCarState());
}
if (StringUtils.isNotBlank(query.getVinNo())) {
qw.like("a1.vinNo", query.getVinNo());
}
String collectionStartDate = query.getCollectionStartDate();
String collectionEndDate = query.getCollectionEndDate();
qw.apply(StringUtils.isNotBlank(collectionStartDate), "date_format (a1.createTime,'%Y-%m-%d') >= date_format('" + collectionStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(collectionEndDate), "date_format (a1.createTime,'%Y-%m-%d') <= date_format('" + collectionEndDate + "','%Y-%m-%d')"
);
qw.groupBy("a1.loanContractNo");
qw.groupBy("a1.vinNo");
qw.groupBy("a1.busVinSid");
if (StringUtils.isNotBlank(query.getBeOverduePeriod())) {
qw.having("beOverduePeriod = {0}", query.getBeOverduePeriod());
}
if (StringUtils.isNotBlank(query.getBeOverdueMoney())) {
qw.having("beOverdueMoney = {0}", query.getBeOverdueMoney());
}
if (StringUtils.isNotBlank(query.getBeOverdueMoneyAndPeriod())) {
qw.having("beOverdueMoneyAndPeriod = {0}", query.getBeOverdueMoneyAndPeriod());
}
List<LoanBeOverdueVehExcelVo> loanBeOverdueVehExcelVos = loanBeOverdueVehMapper.excelList(qw);
return loanBeOverdueVehExcelVos;
}
}

48
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.xml

@ -4,7 +4,7 @@
<insert id="saveList">
insert into
loan_repayment_plan_details(createBySid,sid,createTime,isEnable,salesOrderSid,loanContractSid,loanContractNo,
policyName,bankContractNo,customer,customerSid,borrowerSid,borrowerName,`period`,scheduleSid,bankName,deptSid,dept,useOrgSid,useOrgName,
policyName,bankContractNo,customer,customerSid,borrowerSid,borrowerName,period,scheduleSid,bankName,deptSid,dept,useOrgSid,useOrgName,
orgSidPath,busVinSid,vinNo,vehMark,policyOrOther,dueMoney,dueDate,updateTime)
values
<foreach collection="list" item="item" index="index" separator=",">
@ -57,7 +57,7 @@
select *
from loan_repayment_plan_details
where bankContractNo = #{bankContractNo}
and `period` = #{period}
and period = #{period}
-- and policyOrOther = '0'
</select>
@ -65,17 +65,17 @@
SELECT (
a.yq_total - IFNULL(a.actualMoney, 0)
) AS yq_total
FROM (SELECT lrpd.`dueMoney` AS yq_total,
FROM (SELECT lrpd.dueMoney AS yq_total,
(SELECT SUM(IFNULL(lrh.actualMoney, 0))
FROM loan_repayment_history lrh
WHERE lrh.planDetailSid = lrpd.`sid`
AND lrh.`updateState` = '1') AS actualMoney
FROM `loan_repayment_plan_details` lrpd
WHERE lrh.planDetailSid = lrpd.sid
AND lrh.updateState = '1') AS actualMoney
FROM loan_repayment_plan_details lrpd
WHERE lrpd.vinNo = #{no}
AND lrpd.period = #{period}
AND lrpd.bankContractNo = #{bankContractNo}
AND DATE_FORMAT(lrpd.dueDate, '%Y-%m-%d') &lt; CURDATE()
GROUP BY lrpd.`sid`
GROUP BY lrpd.sid
HAVING (yq_total > 0)) a
</select>
@ -83,20 +83,20 @@
SELECT lrpd.useOrgName,
lrpd.dept,
lrpd.staffName,
RIGHT (lrpd.`vinNo`, 8) AS vinNo,
lrpd.`loanContractNo`,
lrpd.`bankName`,
RIGHT (lrpd.vinNo, 8) AS vinNo,
lrpd.loanContractNo,
lrpd.bankName,
lrpd.bankContractNo,
lrpd.customer,
lrpd.borrowerName,
(
lrpd.`dueMoney` - SUM (IFNULL(lrh.actualMoney, 0))
lrpd.dueMoney - SUM(IFNULL(lrh.actualMoney, 0))
) AS notRepaidMoney
FROM
`loan_repayment_plan_details` lrpd
LEFT JOIN `loan_repayment_history` lrh
ON lrh.planDetailSid = lrpd.`sid`
LEFT JOIN anrui_buscenter.`bus_sales_order_vehicle` bv
loan_repayment_plan_details lrpd
LEFT JOIN loan_repayment_history lrh
ON lrh.planDetailSid = lrpd.sid
LEFT JOIN anrui_buscenter.bus_sales_order_vehicle bv
ON lrpd.busVinSid = bv.sid
LEFT JOIN
(SELECT
@ -107,13 +107,13 @@
ORDER BY createTime DESC
LIMIT 1) lr
ON lrpd.busVinSid = lr.saleVehSid
LEFT JOIN anrui_crm.`crm_customer_temp` ct
LEFT JOIN anrui_crm.crm_customer_temp ct
ON lrpd.customerSid = ct.sid
WHERE DATE_FORMAT(lrpd.dueDate
, '%Y-%m-%d')
&lt; CURDATE()
AND lrpd.busVinSid = #{saleVehSid}
GROUP BY lrpd.`sid`
GROUP BY lrpd.sid
HAVING (notRepaidMoney > 0)
ORDER BY lrpd.period
LIMIT 1
@ -124,12 +124,12 @@
lrpd.dueMoney,
SUM(IFNULL(lrh.actualMoney, 0)) AS receiptMoney,
(
lrpd.`dueMoney` - SUM(IFNULL(lrh.actualMoney, 0))
lrpd.dueMoney - SUM(IFNULL(lrh.actualMoney, 0))
) AS notRepaidMoney
FROM `loan_repayment_plan_details` lrpd
LEFT JOIN `loan_repayment_history` lrh
ON lrh.planDetailSid = lrpd.`sid`
LEFT JOIN anrui_buscenter.`bus_sales_order_vehicle` bv
FROM loan_repayment_plan_details lrpd
LEFT JOIN loan_repayment_history lrh
ON lrh.planDetailSid = lrpd.sid
LEFT JOIN anrui_buscenter.bus_sales_order_vehicle bv
ON lrpd.busVinSid = bv.sid
LEFT JOIN
(SELECT saleVehSid,
@ -137,11 +137,11 @@
FROM loan_be_collection_record
ORDER BY createTime DESC LIMIT 1) lr
ON lrpd.busVinSid = lr.saleVehSid
LEFT JOIN anrui_crm.`crm_customer_temp` ct
LEFT JOIN anrui_crm.crm_customer_temp ct
ON lrpd.customerSid = ct.sid
WHERE DATE_FORMAT(lrpd.dueDate, '%Y-%m-%d') &lt; CURDATE()
AND lrpd.busVinSid = #{saleVehSid}
GROUP BY lrpd.`sid`
GROUP BY lrpd.sid
HAVING (notRepaidMoney > 0)
ORDER BY lrpd.period
</select>

2
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatecheckapply/ScmSpecialrebateCheckapplyRest.java

@ -147,7 +147,7 @@ public class ScmSpecialrebateCheckapplyRest implements ScmSpecialrebateCheckappl
public ResultBean complete(ScmSpecialRebateCheckApplyCompleteDto dto) {
BusinessVariables bv = new BusinessVariables();
BeanUtil.copyProperties(dto, bv);
bv.setModelId(ProcDefEnum.SCMSPECIALREBATECHECKAPPLY.getProDefId());
bv.setModelId("");
return scmSpecialrebateCheckapplyService.complete(bv);
}

52
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatecheckapply/ScmSpecialrebateCheckapplyService.java

@ -38,6 +38,7 @@ import com.yxt.anrui.base.common.utils.Rule;
import com.yxt.anrui.fin.api.finpaymentrecord.FinPaymentrecordSourceLCVo;
import com.yxt.anrui.fin.api.kingdee.FinKingDeeFeign;
import com.yxt.anrui.fin.api.kingdee.voucher.GeneralVoucher;
import com.yxt.anrui.flowable.api.flow.FlowProcessMapQuery;
import com.yxt.anrui.flowable.api.flow.FlowableFeign;
import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo;
import com.yxt.anrui.flowable.api.flow2.FlowDelegateQuery;
@ -371,9 +372,16 @@ public class ScmSpecialrebateCheckapplyService extends MybatisBaseService<ScmSpe
bv.setBusinessSid(businessSid);
//用户sid
bv.setUserSid(dto.getCreateBySid());
bv.setFormVariables(variables);
//流程定义id
bv.setModelId(ProcDefEnum.SCMSPECIALREBATECHECKAPPLY.getProDefId());
//========================================
scmSpecialrebateCheckapply = fetchBySid(businessSid);
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(bv.getModelId());
flowProcessMapQuery.setVariables(variables);
flowProcessMapQuery.setContractNo(scmSpecialrebateCheckapply.getCheckApply());
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
bv.setFormVariables(variables);
//查询单车明细
List<ScmSpecialrebateCheckapplydetailVo> scmSpecialrebateCheckapplydetailVos = scmSpecialrebateCheckapplydetailService.selByMainSid(dto.getSid());
if (r == 1) {
@ -881,6 +889,15 @@ public class ScmSpecialrebateCheckapplyService extends MybatisBaseService<ScmSpe
public ResultBean complete(BusinessVariables bv) {
ResultBean rb = ResultBean.fireFail();
ScmSpecialrebateCheckapply scmSpecialrebateCheckapply = fetchBySid(bv.getBusinessSid());
bv.setModelId(scmSpecialrebateCheckapply.getProcDefId());
Map<String, Object> variables = new HashMap<>();
//========================================
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(bv.getModelId());
flowProcessMapQuery.setVariables(variables);
flowProcessMapQuery.setContractNo(scmSpecialrebateCheckapply.getCheckApply());
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
bv.setFormVariables(variables);
if (bv.getTaskId().equals(scmSpecialrebateCheckapply.getTaskId())) {
ResultBean<UpdateFlowFieldVo> resultBean = flowFeign.handleProsess(bv);
if (!resultBean.getSuccess()) {
@ -943,6 +960,15 @@ public class ScmSpecialrebateCheckapplyService extends MybatisBaseService<ScmSpe
if (businessTaskId.equals(query.getTaskId())) {
com.yxt.anrui.flowable.api.flowtask.FlowTaskVo flowTaskVo = new com.yxt.anrui.flowable.api.flowtask.FlowTaskVo();
BeanUtil.copyProperties(query, flowTaskVo);
Map<String, Object> variables = new HashMap<>();
//========================================
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(scmSpecialrebateCheckapply.getProcDefId());
flowProcessMapQuery.setVariables(variables);
flowProcessMapQuery.setContractNo(scmSpecialrebateCheckapply.getCheckApply());
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
//=======================================
flowTaskVo.setValues(variables);
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.taskReject(flowTaskVo);
if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg());
@ -1017,7 +1043,17 @@ public class ScmSpecialrebateCheckapplyService extends MybatisBaseService<ScmSpe
ResultBean<List<GetNodeVo>> rb = ResultBean.fireFail();
BusinessVariables bv = new BusinessVariables();
BeanUtil.copyProperties(query, bv);
bv.setModelId(ProcDefEnum.SCMSPECIALREBATECHECKAPPLY.getProDefId());
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
Map<String, Object> variables = new HashMap<>();
ScmSpecialrebateCheckapply scmSpecialrebateCheckapply = fetchBySid(bv.getBusinessSid());
bv.setModelId(scmSpecialrebateCheckapply.getProcDefId());
//========================================
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(scmSpecialrebateCheckapply.getProcDefId());
flowProcessMapQuery.setVariables(variables);
flowProcessMapQuery.setContractNo(scmSpecialrebateCheckapply.getCheckApply());
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
bv.setFormVariables(variables);
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv);
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
List<GetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList());
@ -1029,7 +1065,17 @@ public class ScmSpecialrebateCheckapplyService extends MybatisBaseService<ScmSpe
ResultBean<List<GetNodeVo>> rb = ResultBean.fireFail();
BusinessVariables bv = new BusinessVariables();
BeanUtil.copyProperties(query, bv);
bv.setModelId(ProcDefEnum.SCMSPECIALREBATECHECKAPPLY.getProDefId());
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
Map<String, Object> variables = new HashMap<>();
ScmSpecialrebateCheckapply scmSpecialrebateCheckapply = fetchBySid(bv.getBusinessSid());
bv.setModelId(scmSpecialrebateCheckapply.getProcDefId());
//========================================
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(scmSpecialrebateCheckapply.getProcDefId());
flowProcessMapQuery.setVariables(variables);
flowProcessMapQuery.setContractNo(scmSpecialrebateCheckapply.getCheckApply());
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
bv.setFormVariables(variables);
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getPreviousNodesForReject(bv);
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
List<GetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList());

2
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatedistribute/ScmSpecialrebatedistributeRest.java

@ -106,7 +106,7 @@ public class ScmSpecialrebatedistributeRest implements ScmSpecialrebatedistribut
public ResultBean complete(ScmSpecialRebatedistributeCompleteDto dto) {
BusinessVariables bv = new BusinessVariables();
BeanUtil.copyProperties(dto, bv);
bv.setModelId(ProcDefEnum.SCMSPECIALREBATECHEDISTRIBUTE.getProDefId());
bv.setModelId("");
return scmSpecialrebatedistributeService.complete(bv);
}

67
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatedistribute/ScmSpecialrebatedistributeService.java

@ -31,6 +31,7 @@ import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.anrui.base.common.utils.Rule;
import com.yxt.anrui.flowable.api.flow.FlowProcessMapQuery;
import com.yxt.anrui.flowable.api.flow.FlowableFeign;
import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo;
import com.yxt.anrui.flowable.api.flow2.FlowDelegateQuery;
@ -53,6 +54,7 @@ import com.yxt.anrui.scm.api.scmspecialrebatedistribute.flow.SubmitScmSpecialReb
import com.yxt.anrui.scm.api.scmspecialrebatedistributedetail.ScmSpecialrebatedistributedetail;
import com.yxt.anrui.scm.api.scmspecialrebatedistributedetail.ScmSpecialrebatedistributedetailDetailsVo;
import com.yxt.anrui.scm.api.scmspecialrebatedistributedetail.ScmSpecialrebatedistributedetailDto;
import com.yxt.anrui.scm.api.scmvehrebatecheckapply.ScmVehrebateCheckapply;
import com.yxt.anrui.scm.biz.scmspecialrebate.ScmSpecialRebateService;
import com.yxt.anrui.scm.biz.scmspecialrebatedistributedetail.ScmSpecialrebatedistributedetailService;
import com.yxt.anrui.scm.biz.scmspecialrebatevehs.ScmSpecialrebateVehsService;
@ -332,9 +334,16 @@ public class ScmSpecialrebatedistributeService extends MybatisBaseService<ScmSpe
bv.setBusinessSid(businessSid);
//用户sid
bv.setUserSid(dto.getCreateBySid());
bv.setFormVariables(variables);
//流程定义id
bv.setModelId(ProcDefEnum.SCMSPECIALREBATECHEDISTRIBUTE.getProDefId());
//========================================
scmSpecialrebatedistribute = fetchBySid(businessSid);
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(bv.getModelId());
flowProcessMapQuery.setVariables(variables);
flowProcessMapQuery.setContractNo(scmSpecialrebatedistribute.getTitle());
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
bv.setFormVariables(variables);
if (r == 1) {
ResultBean<UpdateFlowFieldVo> voResultBean = flowableFeign.startProcess(bv);
UpdateFlowFieldVo ufVo = voResultBean.getData();
@ -391,6 +400,15 @@ public class ScmSpecialrebatedistributeService extends MybatisBaseService<ScmSpe
public ResultBean complete(BusinessVariables bv) {
ResultBean rb = ResultBean.fireFail();
ScmSpecialrebatedistribute scmSpecialrebatedistribute = fetchBySid(bv.getBusinessSid());
bv.setModelId(scmSpecialrebatedistribute.getProcDefId());
Map<String, Object> variables = new HashMap<>();
//========================================
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(bv.getModelId());
flowProcessMapQuery.setVariables(variables);
flowProcessMapQuery.setContractNo(scmSpecialrebatedistribute.getTitle());
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
bv.setFormVariables(variables);
if (bv.getTaskId().equals(scmSpecialrebatedistribute.getTaskId())) {
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.handleProsess(bv);
if (!resultBean.getSuccess()) {
@ -441,6 +459,15 @@ public class ScmSpecialrebatedistributeService extends MybatisBaseService<ScmSpe
if (businessTaskId.equals(query.getTaskId())) {
com.yxt.anrui.flowable.api.flowtask.FlowTaskVo flowTaskVo = new com.yxt.anrui.flowable.api.flowtask.FlowTaskVo();
BeanUtil.copyProperties(query, flowTaskVo);
Map<String, Object> variables = new HashMap<>();
//========================================
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(scmSpecialrebatedistribute.getProcDefId());
flowProcessMapQuery.setVariables(variables);
flowProcessMapQuery.setContractNo(scmSpecialrebatedistribute.getTitle());
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
//=======================================
flowTaskVo.setValues(variables);
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.taskReject(flowTaskVo);
if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg());
@ -465,7 +492,7 @@ public class ScmSpecialrebatedistributeService extends MybatisBaseService<ScmSpe
ScmSpecialrebatedistribute scmSpecialrebatedistribute = fetchBySid(query.getBusinessSid());
String businessTaskId = scmSpecialrebatedistribute.getTaskId();
if (StringUtils.isNotBlank(businessTaskId)) {
if (businessTaskId.equals(query.getTaskId())) {
if (query.getUserSid().equals(scmSpecialrebatedistribute.getCreateBySid())) {
com.yxt.anrui.flowable.api.flowtask.FlowTaskVo flowTaskVo = new com.yxt.anrui.flowable.api.flowtask.FlowTaskVo();
BeanUtil.copyProperties(query, flowTaskVo);
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.breakProcess(flowTaskVo);
@ -475,6 +502,18 @@ public class ScmSpecialrebatedistributeService extends MybatisBaseService<ScmSpe
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData()));
scmSpecialRebateService.updateState(query.getBusinessSid(), 4);
return rb.success().setData(resultBean.getData());
}else {
if (businessTaskId.equals(query.getTaskId())) {
com.yxt.anrui.flowable.api.flowtask.FlowTaskVo flowTaskVo = new com.yxt.anrui.flowable.api.flowtask.FlowTaskVo();
BeanUtil.copyProperties(query, flowTaskVo);
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.breakProcess(flowTaskVo);
if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg());
}
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData()));
scmSpecialRebateService.updateState(query.getBusinessSid(), 4);
return rb.success().setData(resultBean.getData());
}
}
}
return rb.setMsg("操作失败!提交的数据不一致!");
@ -488,7 +527,17 @@ public class ScmSpecialrebatedistributeService extends MybatisBaseService<ScmSpe
ResultBean<List<GetNodeVo>> rb = ResultBean.fireFail();
BusinessVariables bv = new BusinessVariables();
BeanUtil.copyProperties(query, bv);
bv.setModelId(ProcDefEnum.SCMSPECIALREBATECHEDISTRIBUTE.getProDefId());
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
Map<String, Object> variables = new HashMap<>();
ScmSpecialrebatedistribute scmSpecialrebatedistribute = fetchBySid(bv.getBusinessSid());
bv.setModelId(scmSpecialrebatedistribute.getProcDefId());
//========================================
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(scmSpecialrebatedistribute.getProcDefId());
flowProcessMapQuery.setVariables(variables);
flowProcessMapQuery.setContractNo(scmSpecialrebatedistribute.getTitle());
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
bv.setFormVariables(variables);
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv);
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
List<GetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList());
@ -500,7 +549,17 @@ public class ScmSpecialrebatedistributeService extends MybatisBaseService<ScmSpe
ResultBean<List<GetNodeVo>> rb = ResultBean.fireFail();
BusinessVariables bv = new BusinessVariables();
BeanUtil.copyProperties(query, bv);
bv.setModelId(ProcDefEnum.SCMSPECIALREBATECHEDISTRIBUTE.getProDefId());
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
Map<String, Object> variables = new HashMap<>();
ScmSpecialrebatedistribute scmSpecialrebatedistribute = fetchBySid(bv.getBusinessSid());
bv.setModelId(scmSpecialrebatedistribute.getProcDefId());
//========================================
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(scmSpecialrebatedistribute.getProcDefId());
flowProcessMapQuery.setVariables(variables);
flowProcessMapQuery.setContractNo(scmSpecialrebatedistribute.getTitle());
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
bv.setFormVariables(variables);
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getPreviousNodesForReject(bv);
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
List<GetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList());

2
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewithapply/ScmSpecialRebateWithApplyRest.java

@ -121,7 +121,7 @@ public class ScmSpecialRebateWithApplyRest implements ScmSpecialRebateWithApplyF
public ResultBean complete(ScmSpecialRebateWithApplyCompleteDto dto) {
BusinessVariables bv = new BusinessVariables();
BeanUtil.copyProperties(dto, bv);
bv.setModelId(ProcDefEnum.SCMSPECIALREBATEWITHAPPLY.getProDefId());
bv.setModelId("");
return scmSpecialRebateWithApplyService.complete(bv);
}

53
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewithapply/ScmSpecialRebateWithApplyService.java

@ -38,6 +38,7 @@ import com.yxt.anrui.base.common.utils.Rule;
import com.yxt.anrui.fin.api.finpaymentrecord.FinPaymentrecordSourceLCVo;
import com.yxt.anrui.fin.api.kingdee.FinKingDeeFeign;
import com.yxt.anrui.fin.api.kingdee.voucher.GeneralVoucher;
import com.yxt.anrui.flowable.api.flow.FlowProcessMapQuery;
import com.yxt.anrui.flowable.api.flow.FlowableFeign;
import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo;
import com.yxt.anrui.flowable.api.flow2.FlowDelegateQuery;
@ -63,6 +64,7 @@ import com.yxt.anrui.scm.api.scmspecialrebatewithapply.flow.GetNodeQuery;
import com.yxt.anrui.scm.api.scmspecialrebatewithapply.flow.GetNodeVo;
import com.yxt.anrui.scm.api.scmspecialrebatewithapply.flow.ScmSpecialRebateWithApplyDelegateQuery;
import com.yxt.anrui.scm.api.scmspecialrebatewithapply.flow.SubmitScmSpecialRebateWithApplyDto;
import com.yxt.anrui.scm.api.scmvehrebatecheckapply.ScmVehrebateCheckapply;
import com.yxt.anrui.scm.api.scmvehrebatewithapply.AppVehRebateWithDetailsVo;
import com.yxt.anrui.scm.api.scmvehrebatewithapply.AppVehRebateWithDetailssVo;
import com.yxt.anrui.scm.biz.scmspecialrebate.ScmSpecialRebateService;
@ -366,9 +368,16 @@ public class ScmSpecialRebateWithApplyService extends MybatisBaseService<ScmSpec
bv.setBusinessSid(businessSid);
//用户sid
bv.setUserSid(dto.getCreateBySid());
bv.setFormVariables(variables);
//流程定义id
bv.setModelId(ProcDefEnum.SCMSPECIALREBATEWITHAPPLY.getProDefId());
//========================================
scmSpecialRebateWithApply = fetchBySid(businessSid);
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(bv.getModelId());
flowProcessMapQuery.setVariables(variables);
flowProcessMapQuery.setContractNo(scmSpecialRebateWithApply.getWithApply());
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
bv.setFormVariables(variables);
//获取专项返利sid
List<ScmSpecialRebateWithDto> scmSpecialRebateWiths = dto.getScmSpecialRebateWiths();
for (ScmSpecialRebateWithDto scmSpecialRebateWith : scmSpecialRebateWiths) {
@ -555,6 +564,15 @@ public class ScmSpecialRebateWithApplyService extends MybatisBaseService<ScmSpec
public ResultBean complete(BusinessVariables bv) {
ResultBean rb = ResultBean.fireFail();
ScmSpecialRebateWithApply scmSpecialRebateWithApply = fetchBySid(bv.getBusinessSid());
bv.setModelId(scmSpecialRebateWithApply.getProcDefId());
Map<String, Object> variables = new HashMap<>();
//========================================
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(bv.getModelId());
flowProcessMapQuery.setVariables(variables);
flowProcessMapQuery.setContractNo(scmSpecialRebateWithApply.getWithApply());
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
bv.setFormVariables(variables);
List<String> specialRebateSids = scmSpecialRebateWithService.fetchSpecialReBateSidByMainSid(bv.getBusinessSid());
if (bv.getTaskId().equals(scmSpecialRebateWithApply.getTaskId())) {
ResultBean<UpdateFlowFieldVo> resultBean = flowFeign.handleProsess(bv);
@ -610,6 +628,15 @@ public class ScmSpecialRebateWithApplyService extends MybatisBaseService<ScmSpec
if (businessTaskId.equals(query.getTaskId())) {
com.yxt.anrui.flowable.api.flowtask.FlowTaskVo flowTaskVo = new com.yxt.anrui.flowable.api.flowtask.FlowTaskVo();
BeanUtil.copyProperties(query, flowTaskVo);
Map<String, Object> variables = new HashMap<>();
//========================================
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(scmSpecialRebateWithApply.getProcDefId());
flowProcessMapQuery.setVariables(variables);
flowProcessMapQuery.setContractNo(scmSpecialRebateWithApply.getWithApply());
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
//=======================================
flowTaskVo.setValues(variables);
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.taskReject(flowTaskVo);
if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg());
@ -676,7 +703,17 @@ public class ScmSpecialRebateWithApplyService extends MybatisBaseService<ScmSpec
ResultBean<List<GetNodeVo>> rb = ResultBean.fireFail();
BusinessVariables bv = new BusinessVariables();
BeanUtil.copyProperties(query, bv);
bv.setModelId(ProcDefEnum.SCMSPECIALREBATEWITHAPPLY.getProDefId());
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
Map<String, Object> variables = new HashMap<>();
ScmSpecialRebateWithApply scmSpecialRebateWithApply = fetchBySid(bv.getBusinessSid());
bv.setModelId(scmSpecialRebateWithApply.getProcDefId());
//========================================
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(scmSpecialRebateWithApply.getProcDefId());
flowProcessMapQuery.setVariables(variables);
flowProcessMapQuery.setContractNo(scmSpecialRebateWithApply.getWithApply());
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
bv.setFormVariables(variables);
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv);
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
List<GetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList());
@ -688,7 +725,17 @@ public class ScmSpecialRebateWithApplyService extends MybatisBaseService<ScmSpec
ResultBean<List<GetNodeVo>> rb = ResultBean.fireFail();
BusinessVariables bv = new BusinessVariables();
BeanUtil.copyProperties(query, bv);
bv.setModelId(ProcDefEnum.SCMSPECIALREBATEWITHAPPLY.getProDefId());
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
Map<String, Object> variables = new HashMap<>();
ScmSpecialRebateWithApply scmSpecialRebateWithApply = fetchBySid(bv.getBusinessSid());
bv.setModelId(scmSpecialRebateWithApply.getProcDefId());
//========================================
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(scmSpecialRebateWithApply.getProcDefId());
flowProcessMapQuery.setVariables(variables);
flowProcessMapQuery.setContractNo(scmSpecialRebateWithApply.getWithApply());
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
bv.setFormVariables(variables);
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getPreviousNodesForReject(bv);
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
List<GetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList());

2
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatecheckapply/ScmVehrebateCheckapplyRest.java

@ -157,7 +157,7 @@ public class ScmVehrebateCheckapplyRest implements ScmVehrebateCheckapplyFeign {
public ResultBean complete(ScmVehRebateCheckApplyCompleteDto dto) {
BusinessVariables bv = new BusinessVariables();
BeanUtil.copyProperties(dto, bv);
bv.setModelId(ProcDefEnum.SCMVEHREBATECHECKAPPLY.getProDefId());
bv.setModelId("");
return scmVehrebateCheckapplyService.complete(bv);
}

53
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatecheckapply/ScmVehrebateCheckapplyService.java

@ -42,6 +42,7 @@ import com.yxt.anrui.fin.api.finpaymentrecord.FinPaymentrecordSourceLCVo;
import com.yxt.anrui.fin.api.kingdee.FinKingDeeFeign;
import com.yxt.anrui.fin.api.kingdee.costadjustmentsbill.CostAdjustmentsBill;
import com.yxt.anrui.fin.api.kingdee.voucher.GeneralVoucher;
import com.yxt.anrui.flowable.api.flow.FlowProcessMapQuery;
import com.yxt.anrui.flowable.api.flow.FlowableFeign;
import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo;
import com.yxt.anrui.flowable.api.flow2.FlowDelegateQuery;
@ -67,6 +68,7 @@ import com.yxt.anrui.scm.api.scmvehrebatecheckapply.flow.SubmitScmVehRebateCheck
import com.yxt.anrui.scm.api.scmvehrebatecheckapplydetail.ScmVehrebateCheckapplydetailDetailsVo;
import com.yxt.anrui.scm.api.scmvehrebatecheckapplydetail.ScmVehrebateCheckapplydetailDto;
import com.yxt.anrui.scm.api.scmvehrebatecheckapplydetail.ScmVehrebateCheckapplydetailVo;
import com.yxt.anrui.scm.api.scmvehrebatewithapply.ScmVehRebateWithApply;
import com.yxt.anrui.scm.biz.scmvehrebate.ScmVehRebateService;
import com.yxt.anrui.scm.biz.scmvehrebatecheckapplydetail.ScmVehrebateCheckapplydetailService;
import com.yxt.anrui.scm.biz.scmvehrebatewithapply.ScmVehRebateWithApplyService;
@ -389,9 +391,16 @@ public class ScmVehrebateCheckapplyService extends MybatisBaseService<ScmVehreba
bv.setBusinessSid(businessSid);
//用户sid
bv.setUserSid(dto.getCreateBySid());
bv.setFormVariables(variables);
//流程定义id
bv.setModelId(ProcDefEnum.SCMVEHREBATECHECKAPPLY.getProDefId());
//========================================
scmVehrebateCheckapply = fetchBySid(businessSid);
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(bv.getModelId());
flowProcessMapQuery.setVariables(variables);
flowProcessMapQuery.setContractNo(scmVehrebateCheckapply.getCheckApply());
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
bv.setFormVariables(variables);
//查询单车明细
List<ScmVehrebateCheckapplydetailVo> scmVehrebateCheckapplydetailVos = scmVehrebateCheckapplydetailService.selByMainSid(dto.getSid());
if (r == 1) {
@ -459,6 +468,15 @@ public class ScmVehrebateCheckapplyService extends MybatisBaseService<ScmVehreba
public ResultBean complete(BusinessVariables bv) {
ResultBean rb = ResultBean.fireFail();
ScmVehrebateCheckapply scmVehrebateCheckapply = fetchBySid(bv.getBusinessSid());
bv.setModelId(scmVehrebateCheckapply.getProcDefId());
Map<String, Object> variables = new HashMap<>();
//========================================
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(bv.getModelId());
flowProcessMapQuery.setVariables(variables);
flowProcessMapQuery.setContractNo(scmVehrebateCheckapply.getCheckApply());
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
bv.setFormVariables(variables);
if (bv.getTaskId().equals(scmVehrebateCheckapply.getTaskId())) {
ResultBean<UpdateFlowFieldVo> resultBean = flowFeign.handleProsess(bv);
if (!resultBean.getSuccess()) {
@ -856,6 +874,15 @@ public class ScmVehrebateCheckapplyService extends MybatisBaseService<ScmVehreba
if (businessTaskId.equals(query.getTaskId())) {
com.yxt.anrui.flowable.api.flowtask.FlowTaskVo flowTaskVo = new com.yxt.anrui.flowable.api.flowtask.FlowTaskVo();
BeanUtil.copyProperties(query, flowTaskVo);
Map<String, Object> variables = new HashMap<>();
//========================================
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(scmVehrebateCheckapply.getProcDefId());
flowProcessMapQuery.setVariables(variables);
flowProcessMapQuery.setContractNo(scmVehrebateCheckapply.getCheckApply());
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
//=======================================
flowTaskVo.setValues(variables);
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.taskReject(flowTaskVo);
if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg());
@ -931,7 +958,17 @@ public class ScmVehrebateCheckapplyService extends MybatisBaseService<ScmVehreba
ResultBean<List<GetNodeVo>> rb = ResultBean.fireFail();
BusinessVariables bv = new BusinessVariables();
BeanUtil.copyProperties(query, bv);
bv.setModelId(ProcDefEnum.SCMVEHREBATECHECKAPPLY.getProDefId());
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
Map<String, Object> variables = new HashMap<>();
ScmVehrebateCheckapply scmVehrebateCheckapply = fetchBySid(bv.getBusinessSid());
bv.setModelId(scmVehrebateCheckapply.getProcDefId());
//========================================
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(scmVehrebateCheckapply.getProcDefId());
flowProcessMapQuery.setVariables(variables);
flowProcessMapQuery.setContractNo(scmVehrebateCheckapply.getCheckApply());
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
bv.setFormVariables(variables);
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv);
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
List<GetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList());
@ -943,7 +980,17 @@ public class ScmVehrebateCheckapplyService extends MybatisBaseService<ScmVehreba
ResultBean<List<GetNodeVo>> rb = ResultBean.fireFail();
BusinessVariables bv = new BusinessVariables();
BeanUtil.copyProperties(query, bv);
bv.setModelId(ProcDefEnum.SCMVEHREBATECHECKAPPLY.getProDefId());
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
Map<String, Object> variables = new HashMap<>();
ScmVehrebateCheckapply scmVehrebateCheckapply = fetchBySid(bv.getBusinessSid());
bv.setModelId(scmVehrebateCheckapply.getProcDefId());
//========================================
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(scmVehrebateCheckapply.getProcDefId());
flowProcessMapQuery.setVariables(variables);
flowProcessMapQuery.setContractNo(scmVehrebateCheckapply.getCheckApply());
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
bv.setFormVariables(variables);
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getPreviousNodesForReject(bv);
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
List<GetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList());

2
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyRest.java

@ -120,7 +120,7 @@ public class ScmVehRebateWithApplyRest implements ScmVehRebateWithApplyFeign {
public ResultBean complete(ScmVehRebateWithApplyCompleteDto dto) {
BusinessVariables bv = new BusinessVariables();
BeanUtil.copyProperties(dto, bv);
bv.setModelId(ProcDefEnum.SCMVEHREBATEWITHAPPLY.getProDefId());
bv.setModelId("");
return scmVehRebateWithApplyService.complete(bv);
}

54
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyService.java

@ -38,10 +38,12 @@ import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusOrderAndVehInfo;
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicleFeign;
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTemp;
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempFeign;
import com.yxt.anrui.fin.api.finbillapplication.FinBillApplication;
import com.yxt.anrui.fin.api.finpaymentrecord.FinPaymentrecordSourceLCVo;
import com.yxt.anrui.fin.api.kingdee.FinKingDeeFeign;
import com.yxt.anrui.fin.api.kingdee.costadjustmentsbill.CostAdjustmentsBill;
import com.yxt.anrui.fin.api.kingdee.voucher.GeneralVoucher;
import com.yxt.anrui.flowable.api.flow.FlowProcessMapQuery;
import com.yxt.anrui.flowable.api.flow.FlowableFeign;
import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo;
import com.yxt.anrui.flowable.api.flow2.FlowDelegateQuery;
@ -371,9 +373,16 @@ public class ScmVehRebateWithApplyService extends MybatisBaseService<ScmVehRebat
bv.setBusinessSid(businessSid);
//用户sid
bv.setUserSid(dto.getCreateBySid());
bv.setFormVariables(variables);
//流程定义id
bv.setModelId(ProcDefEnum.SCMVEHREBATEWITHAPPLY.getProDefId());
//========================================
scmVehRebateWithApply = fetchBySid(businessSid);
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(bv.getModelId());
flowProcessMapQuery.setVariables(variables);
flowProcessMapQuery.setContractNo(scmVehRebateWithApply.getWithApply());
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
bv.setFormVariables(variables);
//获取单车返利sid
List<ScmVehRebateWithDto> scmVehRebateWiths = dto.getScmVehRebateWiths();
for (ScmVehRebateWithDto scmVehRebateWith : scmVehRebateWiths) {
@ -632,6 +641,15 @@ public class ScmVehRebateWithApplyService extends MybatisBaseService<ScmVehRebat
public ResultBean complete(BusinessVariables bv) {
ResultBean rb = ResultBean.fireFail();
ScmVehRebateWithApply scmVehRebateWithApply = fetchBySid(bv.getBusinessSid());
bv.setModelId(scmVehRebateWithApply.getProcDefId());
Map<String, Object> variables = new HashMap<>();
//========================================
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(bv.getModelId());
flowProcessMapQuery.setVariables(variables);
flowProcessMapQuery.setContractNo(scmVehRebateWithApply.getWithApply());
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
bv.setFormVariables(variables);
List<String> vehRebateSids = scmVehRebateWithService.fetchVehReBateSidByMainSid(bv.getBusinessSid());
if (bv.getTaskId().equals(scmVehRebateWithApply.getTaskId())) {
ResultBean<UpdateFlowFieldVo> resultBean = flowFeign.handleProsess(bv);
@ -646,7 +664,6 @@ public class ScmVehRebateWithApplyService extends MybatisBaseService<ScmVehRebat
}
//推送单车返利预提凭证
pushVehRebateWithVoucher(bv.getBusinessSid());
}
return rb.success().setData(resultBean.getData());
} else {
@ -689,6 +706,15 @@ public class ScmVehRebateWithApplyService extends MybatisBaseService<ScmVehRebat
if (businessTaskId.equals(query.getTaskId())) {
com.yxt.anrui.flowable.api.flowtask.FlowTaskVo flowTaskVo = new com.yxt.anrui.flowable.api.flowtask.FlowTaskVo();
BeanUtil.copyProperties(query, flowTaskVo);
Map<String, Object> variables = new HashMap<>();
//========================================
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(scmVehRebateWithApply.getProcDefId());
flowProcessMapQuery.setVariables(variables);
flowProcessMapQuery.setContractNo(scmVehRebateWithApply.getWithApply());
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
//=======================================
flowTaskVo.setValues(variables);
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.taskReject(flowTaskVo);
if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg());
@ -755,7 +781,17 @@ public class ScmVehRebateWithApplyService extends MybatisBaseService<ScmVehRebat
ResultBean<List<GetNodeVo>> rb = ResultBean.fireFail();
BusinessVariables bv = new BusinessVariables();
BeanUtil.copyProperties(query, bv);
bv.setModelId(ProcDefEnum.SCMVEHREBATEWITHAPPLY.getProDefId());
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
Map<String, Object> variables = new HashMap<>();
ScmVehRebateWithApply scmVehRebateWithApply = fetchBySid(bv.getBusinessSid());
bv.setModelId(scmVehRebateWithApply.getProcDefId());
//========================================
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(scmVehRebateWithApply.getProcDefId());
flowProcessMapQuery.setVariables(variables);
flowProcessMapQuery.setContractNo(scmVehRebateWithApply.getWithApply());
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
bv.setFormVariables(variables);
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv);
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
List<GetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList());
@ -767,7 +803,17 @@ public class ScmVehRebateWithApplyService extends MybatisBaseService<ScmVehRebat
ResultBean<List<GetNodeVo>> rb = ResultBean.fireFail();
BusinessVariables bv = new BusinessVariables();
BeanUtil.copyProperties(query, bv);
bv.setModelId(ProcDefEnum.SCMVEHREBATEWITHAPPLY.getProDefId());
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
Map<String, Object> variables = new HashMap<>();
ScmVehRebateWithApply scmVehRebateWithApply = fetchBySid(bv.getBusinessSid());
bv.setModelId(scmVehRebateWithApply.getProcDefId());
//========================================
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(scmVehRebateWithApply.getProcDefId());
flowProcessMapQuery.setVariables(variables);
flowProcessMapQuery.setContractNo(scmVehRebateWithApply.getWithApply());
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
bv.setFormVariables(variables);
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getPreviousNodesForReject(bv);
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
List<GetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList());

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

@ -139,6 +139,15 @@ export function selectOrgList(data) {
})
}
// 根据当前登录用户sid获取本分公司下的销售专员
export function selectStaffListByUseOrgSid(data) {
return request({
url: '/portal/v1/sysorganization/selectStaffListByUseOrgSid',
method: 'get',
params: data
})
}
// 根据选择的销售专员获取客户
export function selectCustomerList(data) {
return request({

135
anrui-scm/anrui-scm-ui/src/api/financialDiscount/financialDiscount.js

@ -0,0 +1,135 @@
import request from '@/utils/request'
export default {
// 查询分页列表 -- 金融差异调整管理
finAdjustList: function(data) {
return request({
url: '/scm/v1/scmfinanceadjustapply/finAdjustList',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 查询分页列表 -- 金融差异调整申请
listPage: function(data) {
return request({
url: '/scm/v1/scmfinanceadjustapply/listPage',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 查询分页列表 -- 金融贴息差异调整申请选择车辆
getAdjustVehList: function(data) {
return request({
url: '/scm/v1/scmfinanceadjustapply/getAdjustVehList',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 查询分页列表 -- 金融贴息差异调整申请选择车辆
adjustDetail: function(data) {
return request({
url: '/scm/v1/scmfinanceadjustdetails/listPage',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 删除
delete: function(data) {
return request({
url: '/scm/v1/scmfinanceadjustapply/delBySids',
method: 'DELETE',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 新增保存修改记录
save: function(data) {
return request({
url: '/scm/v1/scmfinanceadjustapply/save',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 通过sid查询一条记录
fetchBySid: function(data) {
return request({
url: '/scm/v1/scmfinanceadjustapply/fetchDetailsBySid/' + data,
method: 'get'
})
},
// 提交流程
submit: function(params) {
return request({
url: '/scm/v1/scmfinanceadjustapply/submit',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 流程审批(同意)
complete: function(params) {
return request({
url: '/scm/v1/scmfinanceadjustapply/complete',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 流程审批(加签)
delegate: function(params) {
return request({
url: '/scm/v1/scmfinanceadjustapply/delegate',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 流程审批(驳回)
reject: function(params) {
return request({
url: '/scm/v1/scmfinanceadjustapply/reject',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 流程审批(终止)
breakProcess: function(params) {
return request({
url: '/scm/v1/scmfinanceadjustapply/breakProcess',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 流程审批(撤回)
revokeProcess: function(params) {
return request({
url: '/scm/v1/scmfinanceadjustapply/revokeProcess',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 审批流程(同意)获取下一环节
getNextNodesForSubmit: function(data) {
return request({
url: '/scm/v1/scmfinanceadjustapply/getNextNodesForSubmit',
method: 'get',
params: data
})
},
// 审批流程(驳回)获取上一环节
getPreviousNodesForReject: function(data) {
return request({
url: '/scm/v1/scmfinanceadjustapply/getPreviousNodesForReject',
method: 'get',
params: data
})
}
}

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

@ -1054,7 +1054,35 @@ const codemenu = [{
}
]
},
// 金融贴息差异调整
{
path: '/financialDiscount',
component: Layout,
redirect: '/financialDiscount',
meta: {
title: '金融贴息差异调整'
},
children: [
{
path: '/financialDiscount/differentialAdjustment',
component: () => import('@/views/financialDiscount/differentialAdjustment/differentialAdjustment.vue'),
name: 'DifferentialAdjustment',
meta: {
title: '差异调整管理',
noCache: true
}
},
{
path: '/financialDiscount/differenceManagement',
component: () => import('@/views/financialDiscount/differenceManagement/differenceManagement.vue'),
name: 'DifferenceManagement',
meta: {
title: '差异调整申请',
noCache: true
}
}
]
},
// 流程审批
// 入库管理编辑
{
@ -1571,6 +1599,27 @@ const codemenu = [{
component: () =>
import('@/views/workFlow/chaijianpankuiFlow/inventoryLossesYiBan.vue'),
name: 'InventoryLossesYiBan'
},
// 金融贴息差异调整申请待办详情页面
{
path: '/chayitiaozhengFlow/differenceManagementDaiBan',
component: () =>
import('@/views/workFlow/chayitiaozhengFlow/differenceManagementDaiBan.vue'),
name: 'differenceManagementDaiBan'
},
// 金融贴息差异调整申请已办详情
{
path: '/chayitiaozhengFlow/differenceManagementEdit',
component: () =>
import('@/views/workFlow/chayitiaozhengFlow/differenceManagementEdit.vue'),
name: 'DifferenceManagementEdit'
},
// 金融贴息差异调整申请办理
{
path: '/chayitiaozhengFlow/differenceManagementYiBan',
component: () =>
import('@/views/workFlow/chayitiaozhengFlow/differenceManagementYiBan.vue'),
name: 'DifferenceManagementYiBan'
}
]
export default codemenu

352
anrui-scm/anrui-scm-ui/src/views/financialDiscount/differenceManagement/differenceManagement.vue

@ -0,0 +1,352 @@
<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-input v-model="listQuery.params.useOrgName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="申请部门">
<el-input v-model="listQuery.params.deptName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="申请人">
<el-input v-model="listQuery.params.createByName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="申请编号">
<el-input v-model="listQuery.params.billNo" placeholder="" clearable/>
</el-form-item>
<el-form-item label="调整方式">
<el-input v-model="listQuery.params.adjustWay" placeholder="" clearable/>
</el-form-item>
<el-form-item label="申请日期">
<el-date-picker v-model="listQuery.params.createStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.createEndDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="办结日期">
<el-date-picker v-model="listQuery.params.closeStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.closeEndDate" 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>
</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="50" />
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80" />
<el-table-column fixed label="操作" align="center" width="180" >
<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="180" 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 prop="billNo" label="申请编号" align="center" min-width="180" />
<el-table-column prop="useOrgName" label="分公司" align="center" width="150" />
<el-table-column prop="deptName" label="申请部门" align="center" width="120" />
<el-table-column prop="createByName" label="申请人" align="center" width="120" />
<el-table-column prop="createTime" label="申请日期" align="center" width="120" />
<el-table-column prop="closingDate" label="办结日期" align="center" width="120" />
<el-table-column prop="adjustWay" label="调整方式" align="center" width="120" />
</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>
<!-- 差异调整金额明细记录 -->
<varianceDetail v-show="viewState == 2" ref="divDetail" @doback="resetState" />
<!-- 差异调整申请新增 -->
<differenceManagementAdd v-show="viewState == 3 || viewState == 4" ref="divAdd" @doback="resetState" @reloadlist="getList" />
<!-- 差异调整申请详情 -->
<differenceManagementInfo v-show="viewState == 5" 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/financialDiscount/financialDiscount'
import Pagination from '@/components/pagination'
import ButtonBar from '@/components/ButtonBar'
import { getStorage } from '@/utils/auth'
import varianceDetail from '../differenceManagement/varianceDetail'
import differenceManagementAdd from './differenceManagementAdd'
import differenceManagementInfo from './differenceManagementInfo'
export default {
name: 'DifferenceManagement',
components: {
Pagination,
ButtonBar,
varianceDetail,
differenceManagementAdd,
differenceManagementInfo
},
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,
listQuery: {
params: {
useOrgName: '',
deptName: '',
createByName: '',
billNo: '',
createStartDate: '',
createEndDate: '',
closeStartDate: '',
closeEndDate: '',
adjustWay: '',
orgPath: '',
userSid: '',
menuUrl: ''
},
current: 1,
size: 5,
total: 0
}
}
},
created() {
//
this.getList()
},
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)))
},
//
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
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.listQuery.params.menuUrl = this.$route.path
req.listPage(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
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: {
useOrgName: '',
deptName: '',
createByName: '',
billNo: '',
createStartDate: '',
createEndDate: '',
closeStartDate: '',
closeEndDate: '',
adjustWay: '',
orgPath: '',
userSid: '',
menuUrl: ''
},
current: 1,
size: 5,
total: 0
}
this.getList()
},
handleClick() {
this.viewState = 2
this.$refs['divDetail'].getList()
},
toEdit(row) {
this.viewState = 4
this.$refs['divAdd'].showEdit(row)
},
toInfo(row) {
this.viewState = 5
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) => {
loading.close()
if (resp.success) {
this.$message({ type: 'success', message: resp.msg, showClose: true })
this.loadList()
}
}).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;
}
/*表格列设置fixed后固定列出现下边框的设置*/
/deep/ .el-table__fixed {
height: 100% !important;
}
/*表格列设置fixed后固定列出现下边框的设置*/
/deep/ .el-table__fixed-right {
height: 100% !important;
}
</style>

436
anrui-scm/anrui-scm-ui/src/views/financialDiscount/differenceManagement/differenceManagementAdd.vue

@ -0,0 +1,436 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</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>
<div class="listconadd">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="16">
<div class="span-sty">申请编号</div>
<el-form-item><span class="addinputInfo">{{ formobj.billNo }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">分公司</div>
<el-form-item><span class="addinputInfo">{{ formobj.useOrgName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty"><span class="icon">*</span>调整方式</div>
<el-form-item prop="adjustWayKey">
<el-select class="addinputInfo" v-model="formobj.adjustWayKey" placeholder="请选择" @change="changeAdjustWay" filterable clearable>
<el-option v-for="item in adjustWay_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<div v-if="formobj.adjustWayKey == '001'">
<div class="span-sty"><span class="icon">*</span>销售专员</div>
<el-form-item prop="staffSid">
<el-select class="addinputInfo" v-model="formobj.staffSid" placeholder="请选择" @change="changeStaff" filterable clearable>
<el-option v-for="item in staff_list" :key="item.userSid" :label="item.name" :value="item.userSid"></el-option>
</el-select>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div v-if="formobj.adjustWayKey == '001'">
<div class="span-sty"><span class="icon">*</span>销售经理</div>
<el-form-item prop="salesManageSid">
<el-select class="addinputInfo" v-model="formobj.salesManageSid" placeholder="请选择" @change="changeSalesManage" filterable clearable>
<el-option v-for="item in salesManager_list" :key="item.sid" :label="item.name" :value="item.sid"></el-option>
</el-select>
</el-form-item>
</div>
</el-col>
</el-row>
<div class="title titleOne">
<el-button size="mini" type="primary" class="btntopblueline" @click="handleSelect()">选择</el-button>
</div>
<el-table :key="tableKey" :data="formobj.list" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column fixed label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button type="danger" size="small" @click="handleDelete(scope.$index)">删除</el-button>
</template>
</el-table-column>
<el-table-column prop="purchaseSystemName" label="采购系统" align="center" width="120" />
<el-table-column prop="brandName" label="品牌" align="center" width="100" />
<el-table-column prop="vehModelName" label="车型" align="center" min-width="160" />
<el-table-column prop="vinNo" label="车架号" align="center" width="140" />
<el-table-column prop="customerName" label="客户名称" align="center" width="120" />
<el-table-column prop="contractNo" label="合同编号" align="center" width="170" />
<el-table-column prop="estimateRebate" label="订单贴息金额" align="center" width="150" />
<el-table-column prop="uploadMoney" label="上传贴息金额" align="center" width="150" />
<el-table-column prop="adjustmentMoney" label="差额" align="center" width="100" />
<el-table-column prop="alreadyMoney" label="已调整金额" align="center" width="140" />
<el-table-column prop="nowDiffAmount" label="当前差额" align="center" width="120" />
<el-table-column prop="nowAdjustmentMoney" label="本次调整金额" align="center" width="160">
<template slot-scope="scope">
<el-input v-model="scope.row.nowAdjustmentMoney" @keyup.native="scope.row.nowAdjustmentMoney = getNumber(scope.row.nowAdjustmentMoney, 2)" clearable placeholder="" />
</template>
</el-table-column>
<el-table-column label="调整说明" align="center" min-width="200">
<template slot-scope="scope">
<el-input v-model="scope.row.remarks" clearable placeholder="" />
</template>
</el-table-column>
</el-table>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><el-input class="addinputInfo" style="width: 80%" v-model="formobj.remarks" clearable placeholder="" /></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">附件</div>
<el-form-item>
<uploadImg ref="uploadImg" class="addinputInfo" v-model="formobj.filePath" :limit="50" bucket="map" :upload-data="{ type: '0001' }"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
<chooseAdjustment v-show="viewState == 2" ref="divChoose" @backData="backData" @doback="resetState" />
</div>
</template>
<script>
import req from '@/api/financialDiscount/financialDiscount'
import { getOrgSidByPath, fetchBySid, selectSysUserList, typeValues, selectStaffListByUseOrgSid } from '@/api/cheliang/dictcommons'
import uploadImg from '@/components/uploadFile/uploadImg'
import chooseAdjustment from './relation/chooseAdjustment'
export default {
name: 'DifferenceManagementAdd',
components: {
uploadImg,
chooseAdjustment
},
data() {
return {
viewTitle: '',
viewState: 1,
submitdisabled: false,
tableKey: 1,
index: 0,
adjustWay_list: [],
staff_list: [],
salesManager_list: [],
formobj: {
sid: '',
createTime: '',
createBySid: '',
createByName: '',
billNo: '',
useOrgSid: '',
useOrgName: '',
deptName: '',
deptSid: '',
adjustWay: '',
adjustWayKey: '',
staffSid: '',
staffName: '',
salesManageSid: '',
salesManage: '',
remarks: '',
taskId: '',
instanceId: '',
list: [],
filePath: []
},
rules: {
adjustWayKey: [{ required: true, message: '调整方式不能为空', trigger: 'change' }],
staffSid: [{ required: true, message: '销售专员不能为空', trigger: 'change' }],
salesManageSid: [{ required: true, message: '销售经理不能为空', trigger: 'change' }]
}
}
},
methods: {
init() {
typeValues({ type: 'adjustingWay' }).then((res) => {
if (res.success) {
this.adjustWay_list = res.data
}
})
selectSysUserList({ userSid: window.sessionStorage.getItem('userSid'), orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => {
if (resp.success) {
this.salesManager_list = resp.data
}
})
},
getNumber(val, limit) {
val = val.replace(/[^0-9.]/g, '') //
val = val.replace(/^00/, '0.') // 0
val = val.replace(/^\./g, '0.') // 0.
val = val.replace(/\.{2,}/g, '.') //
val = val.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.'); //
/^0\d+/.test(val) ? val = val.slice(1) : '' // 0
const str = '^(\\d+)\\.(\\d{' + limit + '}).*$'
const reg = new RegExp(str)
if (limit === 0) {
//
val = val.replace(reg, '$1')
} else {
//
val = val.replace(reg, '$1.$2')
}
return val
},
showAdd() {
this.viewTitle = '【新增】金融贴息差异调整申请'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.init()
this.formobj.createByName = window.sessionStorage.getItem('name')
this.formobj.createBySid = window.sessionStorage.getItem('userSid')
this.formobj.deptName = window.sessionStorage.getItem('defaultOrgPathName').substring(window.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1)
this.formobj.deptSid = window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1)
var nowDate = new Date()
var date = {
year: nowDate.getFullYear(),
month: nowDate.getMonth() + 1,
day: nowDate.getDate()
}
this.formobj.createTime = date.year + '-' + (date.month >= 10 ? date.month : '0' + date.month) + '-' + (date.day >= 10 ? date.day : '0' + date.day)
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => {
if (resp.success) {
this.formobj.useOrgSid = resp.data
selectStaffListByUseOrgSid({ useOrgSid: resp.data }).then((res) => {
if (res.success) {
this.staff_list = res.data
}
})
fetchBySid(resp.data).then((respsone) => {
if (respsone.success) {
this.formobj.useOrgName = respsone.data.name
}
})
}
})
},
showEdit(row) {
this.viewTitle = '【编辑】金融贴息差异调整申请'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.init()
req.fetchBySid(row.sid).then((res) => {
if (res.success) {
this.formobj = res.data
selectStaffListByUseOrgSid({ useOrgSid: this.formobj.useOrgSid }).then((res) => {
if (res.success) {
this.staff_list = res.data
}
})
}
})
},
changeAdjustWay(value) {
const choose = this.adjustWay_list.filter((item) => item.dictKey === value)
if (choose !== null) {
this.formobj.adjustWay = choose[0].dictValue
} else {
this.formobj.adjustWay = ''
}
},
changeStaff(value) {
const choose = this.staff_list.filter((item) => item.userSid === value)
if (choose !== null) {
this.formobj.staffName = choose[0].name
} else {
this.formobj.staffName = ''
}
},
changeSalesManage(value) {
const choose = this.salesManager_list.filter((item) => item.sid === value)
if (choose !== null) {
this.formobj.salesManage = choose[0].name
} else {
this.formobj.salesManage = ''
}
},
handleSelect() {
if (this.formobj.adjustWayKey === '001' && this.formobj.staffName === '') {
this.$message({ showClose: true, type: 'error', message: '因调整方式为客户交纳,请先选择销售专员' })
return
}
this.viewState = 2
this.$refs['divChoose'].showData(this.formobj.list, this.formobj.useOrgSid, this.formobj.staffSid)
},
backData(value) {
this.viewState = 1
value = JSON.parse(JSON.stringify(value))
value.forEach((e) => {
this.formobj.list.push({
rebateSid: e.rebateSid,
purchaseSystemSid: e.purchaseSystemSid,
purchaseSystemName: e.purchaseSystemName,
brandSid: e.brandSid,
brandName: e.brandName,
vehModelSid: e.vehModelSid,
vehModelName: e.vehModelName,
vehSid: e.vehSid,
vinNo: e.vinNo,
customerSid: e.customerSid,
customerName: e.customerName,
contractNo: e.contractNo,
estimateRebate: e.estimateRebate,
uploadMoney: e.uploadMoney,
adjustmentMoney: e.adjustmentMoney,
alreadyMoney: e.alreadyMoney,
nowDiffAmount: e.nowDiffAmount,
nowAdjustmentMoney: '',
remarks: ''
})
})
},
handleDelete(index) {
this.formobj.list.splice(index, 1)
},
resetState() {
this.viewState = 1
},
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'estimateRebate' || column.property === 'uploadMoney' || column.property === 'adjustmentMoney' || column.property === 'alreadyMoney' || column.property === 'nowDiffAmount' || column.property === 'nowAdjustmentMoney') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return Math.round((parseFloat(prev) + parseFloat(curr)) * 100) / 100
} else {
return Math.round((parseFloat(prev)) * 100) / 100
}
}, 0)
sums[index] += ''
}
})
return sums
},
saveOrUpdate() {
if (this.formobj.list.length === 0) {
this.$message({ showClose: true, type: 'error', message: '列表不能为空' })
return
}
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.save(this.formobj).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '保存成功' })
this.handleReturn('true')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
submit() {
if (this.formobj.list.length === 0) {
this.$message({ showClose: true, type: 'error', message: '列表不能为空' })
return
}
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.submit(this.formobj).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '提交成功' })
this.handleReturn('true')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
sid: '',
createTime: '',
createBySid: '',
createByName: '',
billNo: '',
useOrgSid: '',
useOrgName: '',
deptName: '',
deptSid: '',
adjustWay: '',
adjustWayKey: '',
staffSid: '',
staffName: '',
salesManageSid: '',
salesManage: '',
remarks: '',
taskId: '',
instanceId: '',
list: [],
filePath: []
}
this.submitdisabled = false
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
/deep/ .el-form-item__error {
margin-left: 120px !important;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: flex-end;
align-items: center;
}
</style>

203
anrui-scm/anrui-scm-ui/src/views/financialDiscount/differenceManagement/differenceManagementInfo.vue

@ -0,0 +1,203 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="16">
<div class="span-sty">申请编号</div>
<el-form-item><span class="addinputInfo">{{ formobj.billNo }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">分公司</div>
<el-form-item><span class="addinputInfo">{{ formobj.useOrgName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">调整方式</div>
<el-form-item><span class="addinputInfo">{{ formobj.adjustWay }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div v-if="formobj.adjustWayKey == '001'">
<div class="span-sty">销售专员</div>
<el-form-item><span class="addinputInfo">{{ formobj.staffName }}</span></el-form-item>
</div>
</el-col>
<el-col :span="8">
<div v-if="formobj.adjustWayKey == '001'">
<div class="span-sty">销售经理</div>
<el-form-item><span class="addinputInfo">{{ formobj.salesManage }}</span></el-form-item>
</div>
</el-col>
</el-row>
<el-table :key="tableKey" :data="formobj.list" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column prop="purchaseSystemName" label="采购系统" align="center" width="120" />
<el-table-column prop="brandName" label="品牌" align="center" width="100" />
<el-table-column prop="vehModelName" label="车型" align="center" min-width="160" />
<el-table-column prop="vinNo" label="车架号" align="center" width="140" />
<el-table-column prop="customerName" label="客户名称" align="center" width="120" />
<el-table-column prop="contractNo" label="合同编号" align="center" width="170" />
<el-table-column prop="estimateRebate" label="订单贴息金额" align="center" width="150" />
<el-table-column prop="uploadMoney" label="上传贴息金额" align="center" width="150" />
<el-table-column prop="adjustmentMoney" label="差额" align="center" width="100" />
<el-table-column prop="alreadyMoney" label="已调整金额" align="center" width="140" />
<el-table-column prop="nowDiffAmount" label="当前差额" align="center" width="120" />
<el-table-column prop="nowAdjustmentMoney" label="本次调整金额" align="center" width="160" />
<el-table-column prop="remarks" label="调整说明" align="center" min-width="200" />
</el-table>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">附件</div>
<el-form-item><el-image class="addinputInfo" style="width: 150px;height: 150px" v-for="(item, index) in formobj.filePath" :key="index" :src="item" :preview-src-list="formobj.filePath" /></el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/financialDiscount/financialDiscount'
export default {
name: 'DifferenceManagementInfo',
data() {
return {
viewTitle: '',
viewState: 1,
tableKey: 1,
index: 0,
formobj: {
sid: '',
createTime: '',
createBySid: '',
createByName: '',
billNo: '',
useOrgSid: '',
useOrgName: '',
deptName: '',
deptSid: '',
adjustWay: '',
adjustWayKey: '',
staffSid: '',
staffName: '',
salesManageSid: '',
salesManage: '',
remarks: '',
taskId: '',
instanceId: '',
list: [],
filePath: []
},
rules: {}
}
},
methods: {
showInfo(row) {
this.viewTitle = '金融贴息差异调整申请详情'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.fetchBySid(row.sid).then((res) => {
if (res.success) {
this.formobj = res.data
if (this.formobj.filePath.length > 0) {
const aa = []
this.formobj.filePath.forEach((e) => {
aa.push(e.url)
})
this.formobj.filePath = aa
}
}
})
},
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'estimateRebate' || column.property === 'uploadMoney' || column.property === 'adjustmentMoney' || column.property === 'alreadyMoney' || column.property === 'nowDiffAmount' || column.property === 'nowAdjustmentMoney') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return Math.round((parseFloat(prev) + parseFloat(curr)) * 100) / 100
} else {
return Math.round((parseFloat(prev)) * 100) / 100
}
}, 0)
sums[index] += ''
}
})
return sums
},
handleReturn() {
this.formobj = {
sid: '',
createTime: '',
createBySid: '',
createByName: '',
billNo: '',
useOrgSid: '',
useOrgName: '',
deptName: '',
deptSid: '',
adjustWay: '',
adjustWayKey: '',
staffSid: '',
staffName: '',
salesManageSid: '',
salesManage: '',
remarks: '',
taskId: '',
instanceId: '',
list: [],
filePath: []
}
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
</style>

227
anrui-scm/anrui-scm-ui/src/views/financialDiscount/differenceManagement/relation/chooseAdjustment.vue

@ -0,0 +1,227 @@
<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="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.purchaseSystemName" placeholder="" clearable />
</el-form-item>
<el-form-item label="品牌">
<el-input v-model="listQuery.params.brandName" placeholder="" clearable />
</el-form-item>
<el-form-item label="车型">
<el-input v-model="listQuery.params.vehModel" placeholder="" clearable />
</el-form-item>
<el-form-item label="车架号">
<el-input v-model="listQuery.params.vinNo" placeholder="" clearable />
</el-form-item>
<el-form-item label="客户名称">
<el-input v-model="listQuery.params.customerName" placeholder="" clearable />
</el-form-item>
<el-form-item label="合同编号">
<el-input v-model="listQuery.params.contractNo" 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>
<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="50" />
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80" />
<el-table-column prop="state" label="状态" align="center" width="150" />
<el-table-column prop="purchaseSystemName" label="采购系统" align="center" width="140" />
<el-table-column prop="brandName" label="品牌" align="center" width="200" />
<el-table-column prop="vehModelName" label="车型" align="center" width="200" />
<el-table-column prop="vinNo" label="车架号" align="center" width="150" />
<el-table-column prop="customerName" label="客户名称" align="center" width="140" />
<el-table-column prop="contractNo" label="合同编号" align="center" width="120" />
<el-table-column prop="estimateRebate" label="订单贴息" align="center" width="120" />
<el-table-column prop="adjustmentMoney" label="差额" align="center" width="150" />
<el-table-column prop="alreadyMoney" label="已调整" align="center" width="150" />
<el-table-column prop="nowDiffAmount" label="当前差额" align="center" width="100" />
</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/financialDiscount/financialDiscount'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
export default {
name: 'ChooseAdjustment',
components: {
Pagination,
pageye,
ButtonBar
},
data() {
return {
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: '',
btnKey: 'toConfirm',
btnLabel: '确认'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1,
// -----------
tableKey: 0,
list: [],
multipleSelection: [],
FormLoading: false,
listLoading: false,
listQuery: {
params: {
useOrgSid: '',
staffSid: '',
purchaseSystemName: '',
brandName: '',
vehModel: '',
vinNo: '',
customerName: '',
contractNo: '',
sids: []
},
current: 1,
size: 5,
total: 0
}
}
},
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 'toConfirm':
this.toConfirm()
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) {
this.multipleSelection = row
},
showData(value, useOrgSid, staffSid) {
this.listQuery.params.useOrgSid = useOrgSid
this.listQuery.params.staffSid = staffSid
const aa = []
if (value.length > 0) {
for (var i = 0; i < value.length; i++) {
aa.push(value[i].vehSid)
}
this.listQuery.params.sids = aa
} else {
this.listQuery.params.sids = []
}
this.handleReset()
},
//
getList() {
this.listLoading = true
req.getAdjustVehList(this.listQuery).then((response) => {
console.log('列表查询结果:', response)
this.listLoading = false
if (response.success) {
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.current = 1
this.listQuery.size = 5
this.listQuery.total = 0
this.listQuery.params.purchaseSystemName = ''
this.listQuery.params.brandName = ''
this.listQuery.params.vehModel = ''
this.listQuery.params.vinNo = ''
this.listQuery.params.customerName = ''
this.listQuery.params.contractNo = ''
this.getList()
},
toConfirm() {
if (this.multipleSelection.length > 0) {
this.listQuery.params.useOrgSid = ''
this.listQuery.params.staffSid = ''
this.listQuery.params.sids = []
this.$emit('backData', this.multipleSelection)
} else {
this.$message({ showClose: true, type: 'error', message: '请选择至少一条数据进行操作' })
}
},
doClose() {
this.listQuery.params.useOrgSid = ''
this.listQuery.params.staffSid = ''
this.listQuery.params.sids = []
this.$emit('doback')
}
}
}
</script>
<style scoped>
</style>

266
anrui-scm/anrui-scm-ui/src/views/financialDiscount/differenceManagement/varianceDetail.vue

@ -0,0 +1,266 @@
<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.nodeState" placeholder="请选择" filterable clearable>
<el-option v-for="item in state_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue" />
</el-select>
</el-form-item>
<el-form-item label="采购系统">
<el-input v-model="listQuery.params.purchaseSystemName" placeholder="" clearable />
</el-form-item>
<el-form-item label="品牌">
<el-input v-model="listQuery.params.brandName" placeholder="" clearable />
</el-form-item>
<el-form-item label="车型">
<el-input v-model="listQuery.params.vehModelName" placeholder="" clearable />
</el-form-item>
<el-form-item label="车架号">
<el-input v-model="listQuery.params.vinNo" placeholder="" clearable />
</el-form-item>
<el-form-item label="客户名称">
<el-input v-model="listQuery.params.customerName" placeholder="" clearable />
</el-form-item>
<el-form-item label="合同编号">
<el-input v-model="listQuery.params.contractNo" placeholder="" clearable />
</el-form-item>
<el-form-item label="审批编号">
<el-input v-model="listQuery.params.billNo" placeholder="" clearable />
</el-form-item>
<el-form-item label="调整日期">
<el-date-picker v-model="listQuery.params.createStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.createEndDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="调整方式">
<el-input v-model="listQuery.params.adjustWay" placeholder="" clearable />
</el-form-item>
<el-form-item label="调整说明">
<el-input v-model="listQuery.params.remarks" 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%;">
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80" />
<el-table-column prop="nodeState" label="状态" align="center" width="150" />
<el-table-column prop="purchaseSystemName" label="采购系统" align="center" width="140" />
<el-table-column prop="brandName" label="品牌" align="center" width="200" />
<el-table-column prop="vehModelName" label="车型" align="center" width="200" />
<el-table-column prop="vinNo" label="车架号" align="center" width="150" />
<el-table-column prop="customerName" label="客户名称" align="center" width="140" />
<el-table-column prop="contractNo" label="合同编号" align="center" min-width="160" />
<el-table-column prop="estimateRebate" label="订单贴息" align="center" width="120" />
<el-table-column prop="uploadMoney" label="上传贴息" align="center" width="120" />
<el-table-column prop="adjustmentMoney" label="差额" align="center" width="100" />
<el-table-column prop="nowAdjustmentMoney" label="本次调整" align="center" width="100" />
<el-table-column prop="nowDiffAmount" label="本次调整后差额" align="center" width="140" />
<el-table-column prop="adjustTime" label="调整时间" align="center" width="100" />
<el-table-column prop="adjustWay" label="调整方式" align="center" width="100" />
<el-table-column prop="remarks" label="调整说明" align="center" min-width="200" />
</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/financialDiscount/financialDiscount'
import Pagination from '@/components/pagination'
import ButtonBar from '@/components/ButtonBar'
export default {
name: 'VarianceDetail',
components: {
Pagination,
ButtonBar
},
data() {
return {
btndisabled: false,
dialogVisible: false,
btnList: [
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1,
// -----------
tableKey: 0,
list: [],
sids: [],
FormLoading: false,
state_list: [
{
dictKey: '0',
dictValue: '待提交'
},
{
dictKey: '1',
dictValue: '申请中'
},
{
dictKey: '2',
dictValue: '已办结'
}
],
listLoading: false,
listQuery: {
params: {
orgPath: '',
menuUrl: '',
userSid: '',
nodeState: '',
purchaseSystemName: '',
brandName: '',
vehModelName: '',
vinNo: '',
customerName: '',
contractNo: '',
billNo: '',
createStartDate: '',
createEndDate: '',
adjustWay: '',
remarks: ''
},
current: 1,
size: 5,
total: 0
}
}
},
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 '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
},
//
getList() {
this.listLoading = true
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.listQuery.params.menuUrl = this.$route.path
req.adjustDetail(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
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: {
orgPath: '',
menuUrl: '',
userSid: '',
nodeState: '',
purchaseSystemName: '',
brandName: '',
vehModelName: '',
vinNo: '',
customerName: '',
contractNo: '',
billNo: '',
createStartDate: '',
createEndDate: '',
adjustWay: '',
remarks: ''
},
current: 1,
size: 5,
total: 0
}
this.getList()
},
handleClick() {
this.$parent.resetState()
this.$parent.handleReset()
},
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>

251
anrui-scm/anrui-scm-ui/src/views/financialDiscount/differentialAdjustment/differentialAdjustment.vue

@ -0,0 +1,251 @@
<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="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.state" placeholder="请选择" filterable clearable>
<el-option v-for="item in state_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue" />
</el-select>
</el-form-item>
<el-form-item label="采购系统">
<el-input v-model="listQuery.params.purchaseSystemName" placeholder="" clearable />
</el-form-item>
<el-form-item label="品牌">
<el-input v-model="listQuery.params.brandName" placeholder="" clearable />
</el-form-item>
<el-form-item label="车型">
<el-input v-model="listQuery.params.vehModel" placeholder="" clearable />
</el-form-item>
<el-form-item label="车架号">
<el-input v-model="listQuery.params.vinNo" placeholder="" clearable />
</el-form-item>
<el-form-item label="客户名称">
<el-input v-model="listQuery.params.customerName" placeholder="" clearable />
</el-form-item>
<el-form-item label="合同编号">
<el-input v-model="listQuery.params.contractNo" 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>
<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%;">
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80" />
<el-table-column prop="state" label="状态" align="center" width="150" />
<el-table-column prop="purchaseSystemName" label="采购系统" align="center" width="140" />
<el-table-column prop="brandName" label="品牌" align="center" width="150" />
<el-table-column prop="vehModelName" label="车型" align="center" min-width="200" />
<el-table-column prop="vinNo" label="车架号" align="center" width="150" />
<el-table-column prop="customerName" label="客户名称" align="center" width="140" />
<el-table-column prop="contractNo" label="合同编号" align="center" width="180" />
<el-table-column prop="estimateRebate" label="订单贴息" align="center" width="120" />
<el-table-column prop="uploadMoney" label="差额" align="center" width="120" />
<el-table-column prop="alreadyMoney" label="已调整" align="center" width="120" />
<el-table-column prop="nowDiffAmount" label="当前差额" align="center" width="120" />
</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>
<!-- 新增返利 -->
<differenceManagementAdd v-show="viewState == 2" ref="divAdd" @doback="resetState" />
</div>
</template>
<script>
import req from '@/api/financialDiscount/financialDiscount'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import differenceManagementAdd from '../differenceManagement/differenceManagementAdd'
export default {
name: 'DifferentialAdjustment',
components: {
Pagination,
pageye,
ButtonBar,
differenceManagementAdd
},
data() {
return {
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: 'plus',
btnKey: 'toAdd',
btnLabel: '差异调整申请'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1,
// -----------
tableKey: 0,
list: [],
sids: [],
FormLoading: false,
listLoading: false,
state_list: [
{
dictKey: '0',
dictValue: '未调整'
},
{
dictKey: '1',
dictValue: '已调整'
},
{
dictKey: '2',
dictValue: '部分调整'
}
],
listQuery: {
params: {
state: '',
purchaseSystemName: '',
brandName: '',
vehModel: '',
vinNo: '',
customerName: '',
contractNo: '',
orgPath: '',
userSid: '',
menuUrl: ''
},
current: 1,
size: 5,
total: 0
}
}
},
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 'toAdd':
this.toAdd()
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
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.listQuery.params.menuUrl = this.$route.path
req.finAdjustList(this.listQuery).then((response) => {
console.log('列表查询结果:', response)
this.listLoading = false
if (response.success) {
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: {
state: '',
purchaseSystemName: '',
brandName: '',
vehModel: '',
vinNo: '',
customerName: '',
contractNo: '',
orgPath: '',
userSid: '',
menuUrl: ''
},
current: 1,
size: 5,
total: 0
}
this.getList()
},
toAdd() {
this.viewState = 2
this.$refs['divAdd'].showAdd()
},
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>

463
anrui-scm/anrui-scm-ui/src/views/workFlow/chayitiaozhengFlow/differenceManagementDaiBan.vue

@ -0,0 +1,463 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" @click="openCountersign('加签')"> </el-button>
<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>
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="16">
<div class="span-sty">申请编号</div>
<el-form-item><span class="addinputInfo">{{ formobj.billNo }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">分公司</div>
<el-form-item><span class="addinputInfo">{{ formobj.useOrgName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">调整方式</div>
<el-form-item><span class="addinputInfo">{{ formobj.adjustWay }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div v-if="formobj.adjustWayKey == '001'">
<div class="span-sty">销售专员</div>
<el-form-item><span class="addinputInfo">{{ formobj.staffName }}</span></el-form-item>
</div>
</el-col>
<el-col :span="8">
<div v-if="formobj.adjustWayKey == '001'">
<div class="span-sty">销售经理</div>
<el-form-item><span class="addinputInfo">{{ formobj.salesManage }}</span></el-form-item>
</div>
</el-col>
</el-row>
<el-table :key="tableKey" :data="formobj.list" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column prop="purchaseSystemName" label="采购系统" align="center" width="120" />
<el-table-column prop="brandName" label="品牌" align="center" width="100" />
<el-table-column prop="vehModelName" label="车型" align="center" min-width="160" />
<el-table-column prop="vinNo" label="车架号" align="center" width="140" />
<el-table-column prop="customerName" label="客户名称" align="center" width="120" />
<el-table-column prop="contractNo" label="合同编号" align="center" width="170" />
<el-table-column prop="estimateRebate" label="订单贴息金额" align="center" width="150" />
<el-table-column prop="uploadMoney" label="上传贴息金额" align="center" width="150" />
<el-table-column prop="adjustmentMoney" label="差额" align="center" width="100" />
<el-table-column prop="alreadyMoney" label="已调整金额" align="center" width="140" />
<el-table-column prop="nowDiffAmount" label="当前差额" align="center" width="120" />
<el-table-column prop="nowAdjustmentMoney" label="本次调整金额" align="center" width="160" />
<el-table-column prop="remarks" label="调整说明" align="center" min-width="200" />
</el-table>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">附件</div>
<el-form-item><el-image class="addinputInfo" style="width: 150px;height: 150px" v-for="(item, index) in formobj.filePath" :key="index" :src="item" :preview-src-list="formobj.filePath" /></el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
<!-- 选择待办人 的弹出框-->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
<el-form class="formadd" >
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span class="icon">*</span>加签人员:
</el-col>
<el-col :span="20">
<el-form-item>
<el-select v-model="countersign.assignee" placeholder="请选择" filterable>
<el-option v-for="item in options" :key="item.userSid" :label="item.staffName" :value="item.userSid">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span>当前环节:</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item>
</el-col>
</el-row>
<el-row :class="{rowClass:!currentLink}">
<el-col :span="4" class="tleftb">
<span>意见:</span>
</el-col>
<el-col :span="20">
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" type="textarea" :autosize="{ minRows: 1, maxRows: 10}" 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/financialDiscount/financialDiscount'
import { selectStaffListss } from '@/api/Common/dictcommons'
export default {
name: 'DifferenceManagementDaiBan',
data() {
return {
viewTitle: '',
viewState: 1,
tableKey: 1,
index: 0,
formobj: {
sid: '',
createTime: '',
createBySid: '',
createByName: '',
billNo: '',
useOrgSid: '',
useOrgName: '',
deptName: '',
deptSid: '',
adjustWay: '',
adjustWayKey: '',
staffSid: '',
staffName: '',
salesManageSid: '',
salesManage: '',
remarks: '',
taskId: '',
instanceId: '',
list: [],
filePath: []
},
rules: {},
options: [],
operation: '', //
dialogList: {
comment: ''
},
startTask: true,
current: {
taskDefKey: '',
taskName: '' //
},
nextNode: {}, //
nodeDialogVisible: false,
currentLink: true,
countersignLink: false,
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
},
//
countersign: {
taskId: '',
assignee: '',
userSid: '',
instanceId: '',
views: ''
}
}
},
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.countersign.taskId = obj.taskId
this.countersign.userSid = window.sessionStorage.getItem('userSid')
this.countersign.instanceId = obj.instanceId
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 400 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
this.viewTitle = '金融贴息差异调整申请详情'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.fetchBySid(sid).then((res) => {
if (res.success) {
this.formobj = res.data
if (this.formobj.filePath.length > 0) {
const aa = []
this.formobj.filePath.forEach((e) => {
aa.push(e.url)
})
this.formobj.filePath = aa
}
}
})
selectStaffListss().then((res) => {
if (res.success) {
this.options = res.data
}
})
},
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'estimateRebate' || column.property === 'uploadMoney' || column.property === 'adjustmentMoney' || column.property === 'alreadyMoney' || column.property === 'nowDiffAmount' || column.property === 'nowAdjustmentMoney') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return Math.round((parseFloat(prev) + parseFloat(curr)) * 100) / 100
} else {
return Math.round((parseFloat(prev)) * 100) / 100
}
}, 0)
sums[index] += ''
}
})
return sums
},
//
openCountersign(val) {
this.operation = val
this.currentLink = true
this.countersignLink = true
this.dialogList.comment = ''
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openAgree(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = '同意'
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).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.countersignLink = false
this.dialogList.comment = ''
req.getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).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.countersignLink = 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()
}
} else if (this.operation === '加签') {
this.handleCountersign()
}
},
/** 加签 */
handleCountersign() {
if (this.countersign.assignee === '') {
this.$message({ showClose: true, type: 'error', message: '请选择加签人员' })
return
}
if (this.dialogList.comment === '') {
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' })
return
}
this.countersign.views = this.dialogList.comment
req.delegate(this.countersign).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 同意任务 */
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>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.rowClass{
border-top: 1px solid #E0E3EB;
}
</style>

405
anrui-scm/anrui-scm-ui/src/views/workFlow/chayitiaozhengFlow/differenceManagementEdit.vue

@ -0,0 +1,405 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button>
</div>
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="16">
<div class="span-sty">申请编号</div>
<el-form-item><span class="addinputInfo">{{ formobj.billNo }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">分公司</div>
<el-form-item><span class="addinputInfo">{{ formobj.useOrgName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty"><span class="icon">*</span>调整方式</div>
<el-form-item prop="adjustWayKey">
<el-select class="addinputInfo" v-model="formobj.adjustWayKey" placeholder="请选择" @change="changeAdjustWay" filterable clearable>
<el-option v-for="item in adjustWay_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<div v-if="formobj.adjustWayKey == '001'">
<div class="span-sty"><span class="icon">*</span>销售专员</div>
<el-form-item prop="staffSid">
<el-select class="addinputInfo" v-model="formobj.staffSid" placeholder="请选择" @change="changeStaff" filterable clearable>
<el-option v-for="item in staff_list" :key="item.userSid" :label="item.name" :value="item.userSid"></el-option>
</el-select>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div v-if="formobj.adjustWayKey == '001'">
<div class="span-sty"><span class="icon">*</span>销售经理</div>
<el-form-item prop="salesManageSid">
<el-select class="addinputInfo" v-model="formobj.salesManageSid" placeholder="请选择" @change="changeSalesManage" filterable clearable>
<el-option v-for="item in salesManager_list" :key="item.sid" :label="item.name" :value="item.sid"></el-option>
</el-select>
</el-form-item>
</div>
</el-col>
</el-row>
<div class="title titleOne">
<el-button size="mini" type="primary" class="btntopblueline" @click="handleSelect()">选择</el-button>
</div>
<el-table :key="tableKey" :data="formobj.list" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column fixed label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button type="danger" size="small" @click="handleDelete(scope.$index)">删除</el-button>
</template>
</el-table-column>
<el-table-column prop="purchaseSystemName" label="采购系统" align="center" width="120" />
<el-table-column prop="brandName" label="品牌" align="center" width="100" />
<el-table-column prop="vehModelName" label="车型" align="center" min-width="160" />
<el-table-column prop="vinNo" label="车架号" align="center" width="140" />
<el-table-column prop="customerName" label="客户名称" align="center" width="120" />
<el-table-column prop="contractNo" label="合同编号" align="center" width="170" />
<el-table-column prop="estimateRebate" label="订单贴息金额" align="center" width="150" />
<el-table-column prop="uploadMoney" label="上传贴息金额" align="center" width="150" />
<el-table-column prop="adjustmentMoney" label="差额" align="center" width="100" />
<el-table-column prop="alreadyMoney" label="已调整金额" align="center" width="140" />
<el-table-column prop="nowDiffAmount" label="当前差额" align="center" width="120" />
<el-table-column prop="nowAdjustmentMoney" label="本次调整金额" align="center" width="160">
<template slot-scope="scope">
<el-input v-model="scope.row.nowAdjustmentMoney" @keyup.native="scope.row.nowAdjustmentMoney = getNumber(scope.row.nowAdjustmentMoney, 2)" clearable placeholder="" />
</template>
</el-table-column>
<el-table-column label="调整说明" align="center" min-width="200">
<template slot-scope="scope">
<el-input v-model="scope.row.remarks" clearable placeholder="" />
</template>
</el-table-column>
</el-table>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><el-input class="addinputInfo" style="width: 80%" v-model="formobj.remarks" clearable placeholder="" /></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">附件</div>
<el-form-item>
<uploadImg ref="uploadImg" class="addinputInfo" v-model="formobj.filePath" :limit="50" bucket="map" :upload-data="{ type: '0001' }"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
<chooseAdjustment v-show="viewState == 2" ref="divChoose" @backData="backData" @doback="resetState" />
</div>
</template>
<script>
import req from '@/api/financialDiscount/financialDiscount'
import { getOrgSidByPath, fetchBySid, selectSysUserList, typeValues, selectStaffListByUseOrgSid } from '@/api/cheliang/dictcommons'
import uploadImg from '@/components/uploadFile/uploadImg'
import chooseAdjustment from './relation/chooseAdjustment'
export default {
name: 'DifferenceManagementEdit',
components: {
uploadImg,
chooseAdjustment
},
data() {
return {
viewTitle: '',
viewState: 1,
submitdisabled: false,
tableKey: 1,
index: 0,
adjustWay_list: [],
staff_list: [],
salesManager_list: [],
formobj: {
sid: '',
createTime: '',
createBySid: '',
createByName: '',
billNo: '',
useOrgSid: '',
useOrgName: '',
deptName: '',
deptSid: '',
adjustWay: '',
adjustWayKey: '',
staffSid: '',
staffName: '',
salesManageSid: '',
salesManage: '',
remarks: '',
taskId: '',
instanceId: '',
list: [],
filePath: []
},
rules: {
adjustWayKey: [{ required: true, message: '调整方式不能为空', trigger: 'change' }],
staffSid: [{ required: true, message: '销售专员不能为空', trigger: 'change' }],
salesManageSid: [{ required: true, message: '销售经理不能为空', trigger: 'change' }]
}
}
},
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: 500 + 'px'
}
}, '*')
},
methods: {
init() {
typeValues({ type: 'adjustingWay' }).then((res) => {
if (res.success) {
this.adjustWay_list = res.data
}
})
},
getNumber(val, limit) {
val = val.replace(/[^0-9.]/g, '') //
val = val.replace(/^00/, '0.') // 0
val = val.replace(/^\./g, '0.') // 0.
val = val.replace(/\.{2,}/g, '.') //
val = val.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.'); //
/^0\d+/.test(val) ? val = val.slice(1) : '' // 0
const str = '^(\\d+)\\.(\\d{' + limit + '}).*$'
const reg = new RegExp(str)
if (limit === 0) {
//
val = val.replace(reg, '$1')
} else {
//
val = val.replace(reg, '$1.$2')
}
return val
},
showInfo(sid) {
this.viewTitle = '【编辑】金融贴息差异调整申请'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.init()
req.fetchBySid(sid).then((res) => {
if (res.success) {
this.formobj = res.data
selectSysUserList({ userSid: window.sessionStorage.getItem('userSid'), orgPath: this.formobj.orgPath }).then((resp) => {
if (resp.success) {
this.salesManager_list = resp.data
}
})
selectStaffListByUseOrgSid({ useOrgSid: this.formobj.useOrgSid }).then((res) => {
if (res.success) {
this.staff_list = res.data
}
})
}
})
},
changeAdjustWay(value) {
const choose = this.adjustWay_list.filter((item) => item.dictKey === value)
if (choose !== null) {
this.formobj.adjustWay = choose[0].dictValue
} else {
this.formobj.adjustWay = ''
}
},
changeStaff(value) {
const choose = this.staff_list.filter((item) => item.userSid === value)
if (choose !== null) {
this.formobj.staffName = choose[0].name
} else {
this.formobj.staffName = ''
}
},
changeSalesManage(value) {
const choose = this.salesManager_list.filter((item) => item.sid === value)
if (choose !== null) {
this.formobj.salesManage = choose[0].name
} else {
this.formobj.salesManage = ''
}
},
handleSelect() {
if (this.formobj.adjustWayKey === '001' && this.formobj.staffName === '') {
this.$message({ showClose: true, type: 'error', message: '因调整方式为客户交纳,请先选择销售专员' })
return
}
this.viewState = 2
this.$refs['divChoose'].showData(this.formobj.list, this.formobj.useOrgSid, this.formobj.staffSid)
},
backData(value) {
this.viewState = 1
value = JSON.parse(JSON.stringify(value))
value.forEach((e) => {
this.formobj.list.push({
rebateSid: e.rebateSid,
purchaseSystemSid: e.purchaseSystemSid,
purchaseSystemName: e.purchaseSystemName,
brandSid: e.brandSid,
brandName: e.brandName,
vehModelSid: e.vehModelSid,
vehModelName: e.vehModelName,
vehSid: e.vehSid,
vinNo: e.vinNo,
customerSid: e.customerSid,
customerName: e.customerName,
contractNo: e.contractNo,
estimateRebate: e.estimateRebate,
uploadMoney: e.uploadMoney,
adjustmentMoney: e.adjustmentMoney,
alreadyMoney: e.alreadyMoney,
nowDiffAmount: e.nowDiffAmount,
nowAdjustmentMoney: '',
remarks: ''
})
})
},
handleDelete(index) {
this.formobj.list.splice(index, 1)
},
resetState() {
this.viewState = 1
},
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'estimateRebate' || column.property === 'uploadMoney' || column.property === 'adjustmentMoney' || column.property === 'alreadyMoney' || column.property === 'nowDiffAmount' || column.property === 'nowAdjustmentMoney') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return Math.round((parseFloat(prev) + parseFloat(curr)) * 100) / 100
} else {
return Math.round((parseFloat(prev)) * 100) / 100
}
}, 0)
sums[index] += ''
}
})
return sums
},
saveOrUpdate() {
if (this.formobj.list.length === 0) {
this.$message({ showClose: true, type: 'error', message: '列表不能为空' })
return
}
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.save(this.formobj).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '保存成功' })
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
submit() {
if (this.formobj.list.length === 0) {
this.$message({ showClose: true, type: 'error', message: '列表不能为空' })
return
}
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.submit(this.formobj).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '提交成功' })
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
/deep/ .el-form-item__error {
margin-left: 120px !important;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: flex-end;
align-items: center;
}
</style>

249
anrui-scm/anrui-scm-ui/src/views/workFlow/chayitiaozhengFlow/differenceManagementYiBan.vue

@ -0,0 +1,249 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div>
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="16">
<div class="span-sty">申请编号</div>
<el-form-item><span class="addinputInfo">{{ formobj.billNo }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">分公司</div>
<el-form-item><span class="addinputInfo">{{ formobj.useOrgName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">调整方式</div>
<el-form-item><span class="addinputInfo">{{ formobj.adjustWay }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div v-if="formobj.adjustWayKey == '001'">
<div class="span-sty">销售专员</div>
<el-form-item><span class="addinputInfo">{{ formobj.staffName }}</span></el-form-item>
</div>
</el-col>
<el-col :span="8">
<div v-if="formobj.adjustWayKey == '001'">
<div class="span-sty">销售经理</div>
<el-form-item><span class="addinputInfo">{{ formobj.salesManage }}</span></el-form-item>
</div>
</el-col>
</el-row>
<el-table :key="tableKey" :data="formobj.list" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column prop="purchaseSystemName" label="采购系统" align="center" width="120" />
<el-table-column prop="brandName" label="品牌" align="center" width="100" />
<el-table-column prop="vehModelName" label="车型" align="center" min-width="160" />
<el-table-column prop="vinNo" label="车架号" align="center" width="140" />
<el-table-column prop="customerName" label="客户名称" align="center" width="120" />
<el-table-column prop="contractNo" label="合同编号" align="center" width="170" />
<el-table-column prop="estimateRebate" label="订单贴息金额" align="center" width="150" />
<el-table-column prop="uploadMoney" label="上传贴息金额" align="center" width="150" />
<el-table-column prop="adjustmentMoney" label="差额" align="center" width="100" />
<el-table-column prop="alreadyMoney" label="已调整金额" align="center" width="140" />
<el-table-column prop="nowDiffAmount" label="当前差额" align="center" width="120" />
<el-table-column prop="nowAdjustmentMoney" label="本次调整金额" align="center" width="160" />
<el-table-column prop="remarks" label="调整说明" align="center" min-width="200" />
</el-table>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">附件</div>
<el-form-item><el-image class="addinputInfo" style="width: 150px;height: 150px" v-for="(item, index) in formobj.filePath" :key="index" :src="item" :preview-src-list="formobj.filePath" /></el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/financialDiscount/financialDiscount'
export default {
name: 'DifferenceManagementYiBan',
data() {
return {
viewTitle: '',
viewState: 1,
tableKey: 1,
index: 0,
formobj: {
sid: '',
createTime: '',
createBySid: '',
createByName: '',
billNo: '',
useOrgSid: '',
useOrgName: '',
deptName: '',
deptSid: '',
adjustWay: '',
adjustWayKey: '',
staffSid: '',
staffName: '',
salesManageSid: '',
salesManage: '',
remarks: '',
taskId: '',
instanceId: '',
list: [],
filePath: []
},
rules: {},
//
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.userSid = window.sessionStorage.getItem('userSid')
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 400 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
this.viewTitle = '金融贴息差异调整申请详情'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.fetchBySid(sid).then((res) => {
if (res.success) {
this.formobj = res.data
if (this.formobj.filePath.length > 0) {
const aa = []
this.formobj.filePath.forEach((e) => {
aa.push(e.url)
})
this.formobj.filePath = aa
}
}
})
},
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'estimateRebate' || column.property === 'uploadMoney' || column.property === 'adjustmentMoney' || column.property === 'alreadyMoney' || column.property === 'nowDiffAmount' || column.property === 'nowAdjustmentMoney') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return Math.round((parseFloat(prev) + parseFloat(curr)) * 100) / 100
} else {
return Math.round((parseFloat(prev)) * 100) / 100
}
}, 0)
sums[index] += ''
}
})
return sums
},
/** 确认撤回任务 */
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>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
</style>

227
anrui-scm/anrui-scm-ui/src/views/workFlow/chayitiaozhengFlow/relation/chooseAdjustment.vue

@ -0,0 +1,227 @@
<template>
<div class="app-container">
<!-- Start 列表页面 -->
<div v-show="viewState == 1">
<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.purchaseSystemName" placeholder="" clearable />
</el-form-item>
<el-form-item label="品牌">
<el-input v-model="listQuery.params.brandName" placeholder="" clearable />
</el-form-item>
<el-form-item label="车型">
<el-input v-model="listQuery.params.vehModel" placeholder="" clearable />
</el-form-item>
<el-form-item label="车架号">
<el-input v-model="listQuery.params.vinNo" placeholder="" clearable />
</el-form-item>
<el-form-item label="客户名称">
<el-input v-model="listQuery.params.customerName" placeholder="" clearable />
</el-form-item>
<el-form-item label="合同编号">
<el-input v-model="listQuery.params.contractNo" 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>
<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="50" />
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80" />
<el-table-column prop="state" label="状态" align="center" width="150" />
<el-table-column prop="purchaseSystemName" label="采购系统" align="center" width="140" />
<el-table-column prop="brandName" label="品牌" align="center" width="200" />
<el-table-column prop="vehModelName" label="车型" align="center" width="200" />
<el-table-column prop="vinNo" label="车架号" align="center" width="150" />
<el-table-column prop="customerName" label="客户名称" align="center" width="140" />
<el-table-column prop="contractNo" label="合同编号" align="center" width="120" />
<el-table-column prop="estimateRebate" label="订单贴息" align="center" width="120" />
<el-table-column prop="adjustmentMoney" label="差额" align="center" width="150" />
<el-table-column prop="alreadyMoney" label="已调整" align="center" width="150" />
<el-table-column prop="nowDiffAmount" label="当前差额" align="center" width="100" />
</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/financialDiscount/financialDiscount'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
export default {
name: 'ChooseAdjustment',
components: {
Pagination,
pageye,
ButtonBar
},
data() {
return {
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: '',
btnKey: 'toConfirm',
btnLabel: '确认'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1,
// -----------
tableKey: 0,
list: [],
multipleSelection: [],
FormLoading: false,
listLoading: false,
listQuery: {
params: {
useOrgSid: '',
staffSid: '',
purchaseSystemName: '',
brandName: '',
vehModel: '',
vinNo: '',
customerName: '',
contractNo: '',
sids: []
},
current: 1,
size: 5,
total: 0
}
}
},
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 'toConfirm':
this.toConfirm()
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) {
this.multipleSelection = row
},
showData(value, useOrgSid, staffSid) {
this.listQuery.params.useOrgSid = useOrgSid
this.listQuery.params.staffSid = staffSid
const aa = []
if (value.length > 0) {
for (var i = 0; i < value.length; i++) {
aa.push(value[i].vehSid)
}
this.listQuery.params.sids = aa
} else {
this.listQuery.params.sids = []
}
this.handleReset()
},
//
getList() {
this.listLoading = true
req.getAdjustVehList(this.listQuery).then((response) => {
console.log('列表查询结果:', response)
this.listLoading = false
if (response.success) {
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.current = 1
this.listQuery.size = 5
this.listQuery.total = 0
this.listQuery.params.purchaseSystemName = ''
this.listQuery.params.brandName = ''
this.listQuery.params.vehModel = ''
this.listQuery.params.vinNo = ''
this.listQuery.params.customerName = ''
this.listQuery.params.contractNo = ''
this.getList()
},
toConfirm() {
if (this.multipleSelection.length > 0) {
this.listQuery.params.useOrgSid = ''
this.listQuery.params.staffSid = ''
this.listQuery.params.sids = []
this.$emit('backData', this.multipleSelection)
} else {
this.$message({ showClose: true, type: 'error', message: '请选择至少一条数据进行操作' })
}
},
doClose() {
this.listQuery.params.useOrgSid = ''
this.listQuery.params.staffSid = ''
this.listQuery.params.sids = []
this.$emit('doback')
}
}
}
</script>
<style scoped>
</style>
Loading…
Cancel
Save