
50 changed files with 3663 additions and 23 deletions
@ -0,0 +1,41 @@ |
|||||
|
package com.yxt.anrui.base.api.basevehiclestate; |
||||
|
|
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: 车辆持久状态 |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class BaseVehicleState extends BaseEntity { |
||||
|
private static final long serialVersionUID = -8658861219326308912L; |
||||
|
@ApiModelProperty("车辆sid") |
||||
|
private String vinSid; |
||||
|
@ApiModelProperty("车架号") |
||||
|
private String vinNo; |
||||
|
@ApiModelProperty("销售订单车辆sid") |
||||
|
private String busSid; |
||||
|
@ApiModelProperty("业务阶段序号") |
||||
|
private String busNo; |
||||
|
@ApiModelProperty("业务阶段名称") |
||||
|
private String busName; |
||||
|
@ApiModelProperty("业务状态") |
||||
|
private String busState; |
||||
|
@ApiModelProperty("款项状态") |
||||
|
private String finState; |
||||
|
@ApiModelProperty("发票状态") |
||||
|
private String invoiceState; |
||||
|
@ApiModelProperty("欠款提车状态") |
||||
|
private String carryVehicleState; |
||||
|
@ApiModelProperty("欠款开票状态") |
||||
|
private String carryInvoiceState; |
||||
|
@ApiModelProperty("包牌业务") |
||||
|
private String packageBusiness; |
||||
|
@ApiModelProperty("合同状态") |
||||
|
private String contractState; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
package com.yxt.anrui.base.api.basevehiclestate; |
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class BaseVehicleStateDto implements Dto { |
||||
|
private static final long serialVersionUID = -3250371728132610725L; |
||||
|
@ApiModelProperty("车辆sid") |
||||
|
private String vinSid; |
||||
|
@ApiModelProperty("车架号") |
||||
|
private String vinNo; |
||||
|
@ApiModelProperty("销售订单车辆sid") |
||||
|
private String busSid; |
||||
|
@ApiModelProperty("业务阶段序号") |
||||
|
private String busNo; |
||||
|
@ApiModelProperty("业务阶段名称") |
||||
|
private String busName; |
||||
|
@ApiModelProperty("操作类型") |
||||
|
private String operateType; |
||||
|
} |
@ -0,0 +1,80 @@ |
|||||
|
package com.yxt.anrui.base.api.basevehiclestate; |
||||
|
|
||||
|
import lombok.Getter; |
||||
|
|
||||
|
/** |
||||
|
* @description: 车辆持久状态 |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
public class BaseVehicleStateEnum { |
||||
|
|
||||
|
@Getter |
||||
|
public static enum BusNoEnum { |
||||
|
/** |
||||
|
* 车辆业务阶段序号 |
||||
|
*/ |
||||
|
DDBA("200", "订单备案"), |
||||
|
CKKP("400", "出库开票"), |
||||
|
JC("500", "交车"), |
||||
|
YWJS("600", "业务结束"), |
||||
|
; |
||||
|
|
||||
|
private String busNoKey; |
||||
|
private String busNoValue; |
||||
|
|
||||
|
BusNoEnum(String busNoKey, String busNoValue) { |
||||
|
this.busNoKey = busNoKey; |
||||
|
this.busNoValue = busNoValue; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@Getter |
||||
|
public static enum BusStateEnum { |
||||
|
/** |
||||
|
* 车辆阶段状态 |
||||
|
*/ |
||||
|
CKKP_STATE_1("401", "待出库"), |
||||
|
CKKP_STATE_2("402", "出库中"), |
||||
|
JC_STATE_1("501", "待准备"), |
||||
|
JC_STATE_2("502", "待交车"), |
||||
|
JC_STATE_3("503", "已交车"), |
||||
|
YWJS_STATE_1("601", "业务完成"), |
||||
|
YWJS_STATE_2("602", "业务终止"), |
||||
|
|
||||
|
; |
||||
|
|
||||
|
private String stateKey; |
||||
|
private String stateValue; |
||||
|
|
||||
|
BusStateEnum(String stateKey, String stateValue) { |
||||
|
this.stateKey = stateKey; |
||||
|
this.stateValue = stateValue; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Getter |
||||
|
public static enum OperateTypeEnum { |
||||
|
/** |
||||
|
* 操作类型 |
||||
|
*/ |
||||
|
DDBA_SUBMIT("201", "订单提交"), |
||||
|
DDBA_PASS("202", "订单审核通过"), |
||||
|
CKKP_PASS("401", "出库开票审核通过"), |
||||
|
JC_PASS("402", "交车审核通过"), |
||||
|
BUS_STOP("602", "业务终止"), |
||||
|
|
||||
|
; |
||||
|
|
||||
|
private String typeKey; |
||||
|
private String typeValue; |
||||
|
|
||||
|
OperateTypeEnum(String typeKey, String typeValue) { |
||||
|
this.typeKey = typeKey; |
||||
|
this.typeValue = typeValue; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
package com.yxt.anrui.base.api.basevehiclestate; |
||||
|
|
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
@Api(tags = "车辆持久状态") |
||||
|
@FeignClient( |
||||
|
contextId = "anrui-base-BaseVehicleState", |
||||
|
name = "anrui-base", |
||||
|
path = "v1/BaseVehicleState", |
||||
|
fallback = BaseVehicleStateFeignFallback.class) |
||||
|
public interface BaseVehicleStateFeign { |
||||
|
|
||||
|
@PostMapping("saveOrUpdate") |
||||
|
ResultBean saveOrUpdate(@RequestBody BaseVehicleStateDto dto); |
||||
|
} |
@ -0,0 +1,9 @@ |
|||||
|
package com.yxt.anrui.base.api.basevehiclestate; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
public class BaseVehicleStateFeignFallback { |
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
package com.yxt.anrui.base.biz.basevehiclestate; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.yxt.anrui.base.api.basevehiclestate.BaseVehicleState; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
@Mapper |
||||
|
public interface BaseVehicleStateMapper extends BaseMapper<BaseVehicleState> { |
||||
|
BaseVehicleState selectOnes(String busSid); |
||||
|
} |
@ -0,0 +1,9 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.yxt.anrui.base.biz.basevehiclestate.BaseVehicleStateMapper"> |
||||
|
<select id="selectOnes" resultType="com.yxt.anrui.base.api.basevehiclestate.BaseVehicleState"> |
||||
|
select * |
||||
|
from base_vehicle_state |
||||
|
where busSid = #{busSid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,29 @@ |
|||||
|
package com.yxt.anrui.base.biz.basevehiclestate; |
||||
|
|
||||
|
import com.yxt.anrui.base.api.basevehiclestate.BaseVehicleStateDto; |
||||
|
import com.yxt.anrui.base.api.basevehiclestate.BaseVehicleStateFeign; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
|
||||
|
@Api(tags = "车辆持久状态") |
||||
|
@RestController |
||||
|
@RequestMapping("v1/BaseVehicleState") |
||||
|
public class BaseVehicleStateRest implements BaseVehicleStateFeign { |
||||
|
|
||||
|
@Autowired |
||||
|
private BaseVehicleStateService baseVehicleStateService; |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean saveOrUpdate(BaseVehicleStateDto dto) { |
||||
|
return baseVehicleStateService.saveOrUpdateState(dto); |
||||
|
} |
||||
|
} |
@ -0,0 +1,56 @@ |
|||||
|
package com.yxt.anrui.base.biz.basevehiclestate; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.yxt.anrui.base.api.basevehiclestate.BaseVehicleState; |
||||
|
import com.yxt.anrui.base.api.basevehiclestate.BaseVehicleStateDto; |
||||
|
import com.yxt.anrui.base.api.basevehiclestate.BaseVehicleStateEnum; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
@Service |
||||
|
public class BaseVehicleStateService extends MybatisBaseService<BaseVehicleStateMapper, BaseVehicleState> { |
||||
|
|
||||
|
public ResultBean saveOrUpdateState(BaseVehicleStateDto dto) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
String operateType = dto.getOperateType(); |
||||
|
String busSid = dto.getBusSid(); |
||||
|
BaseVehicleState baseVehicleState = baseMapper.selectOnes(busSid); |
||||
|
if (BaseVehicleStateEnum.OperateTypeEnum.DDBA_SUBMIT.equals(operateType)) { |
||||
|
//销售订单提交时
|
||||
|
baseVehicleState = new BaseVehicleState(); |
||||
|
BeanUtil.copyProperties(dto, baseVehicleState, "sid"); |
||||
|
baseMapper.insert(baseVehicleState); |
||||
|
} else if (BaseVehicleStateEnum.OperateTypeEnum.DDBA_PASS.equals(operateType)) { |
||||
|
//销售订单办理通过后更新业务阶段为出库开票、小状态为待出库,款项状态为0
|
||||
|
baseVehicleState.setFinState("0"); |
||||
|
baseVehicleState.setBusNo(BaseVehicleStateEnum.BusNoEnum.CKKP.getBusNoKey()); |
||||
|
baseVehicleState.setBusName(BaseVehicleStateEnum.BusNoEnum.CKKP.getBusNoValue()); |
||||
|
baseVehicleState.setBusState(BaseVehicleStateEnum.BusStateEnum.CKKP_STATE_1.getStateKey()); |
||||
|
} else if (BaseVehicleStateEnum.OperateTypeEnum.CKKP_PASS.equals(operateType)) { |
||||
|
//出库通过后更新业务阶段为交车,小状态为待准备501
|
||||
|
baseVehicleState.setBusNo(BaseVehicleStateEnum.BusNoEnum.JC.getBusNoKey()); |
||||
|
baseVehicleState.setBusName(BaseVehicleStateEnum.BusNoEnum.JC.getBusNoValue()); |
||||
|
baseVehicleState.setBusState(BaseVehicleStateEnum.BusStateEnum.JC_STATE_1.getStateKey()); |
||||
|
|
||||
|
} else if (BaseVehicleStateEnum.OperateTypeEnum.JC_PASS.equals(operateType)) { |
||||
|
//交车确认通过后更新业务状态为业务结束,小状态为业务完成601
|
||||
|
baseVehicleState.setBusNo(BaseVehicleStateEnum.BusNoEnum.YWJS.getBusNoKey()); |
||||
|
baseVehicleState.setBusName(BaseVehicleStateEnum.BusNoEnum.YWJS.getBusNoValue()); |
||||
|
baseVehicleState.setBusState(BaseVehicleStateEnum.BusStateEnum.YWJS_STATE_1.getStateKey()); |
||||
|
} else if (BaseVehicleStateEnum.OperateTypeEnum.BUS_STOP.equals(operateType)) { |
||||
|
//如果为终止或作废,则更新小状态为业务终止602
|
||||
|
baseVehicleState.setBusState(BaseVehicleStateEnum.BusStateEnum.YWJS_STATE_2.getStateKey()); |
||||
|
} |
||||
|
|
||||
|
//认款办理确认以及结转审核通过的更新款项状态为1,否则为0
|
||||
|
|
||||
|
baseMapper.updateById(baseVehicleState); |
||||
|
return rb.success(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,113 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
export default { |
||||
|
// 查询分页列表
|
||||
|
listPage: function(params) { |
||||
|
return request({ |
||||
|
url: '/riskcenter/v1/loanfinotherpolicyrecordapply/listPage', |
||||
|
method: 'post', |
||||
|
data: params, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
saveOrUpdate: function(data) { |
||||
|
return request({ |
||||
|
url: '/riskcenter/v1/loanfinotherpolicyrecordapply/saveOrUpdate', |
||||
|
method: 'post', |
||||
|
data: data, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
policyRecordInit: function(data) { |
||||
|
return request({ |
||||
|
url: '/riskcenter/v1/loanfinotherpolicyrecordapply/policyRecordInit', |
||||
|
method: 'post', |
||||
|
data: data, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
fetchBySid: function(data) { |
||||
|
return request({ |
||||
|
url: '/riskcenter/v1/loanfinotherpolicyrecordapply/fetchDetailsBySid/' + data, |
||||
|
method: 'get' |
||||
|
}) |
||||
|
}, |
||||
|
deleteBySids: function(data) { |
||||
|
return request({ |
||||
|
url: '/riskcenter/v1/loanfinotherpolicyrecordapply/deleteBySids', |
||||
|
method: 'DELETE', |
||||
|
data: data, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
// 提交流程
|
||||
|
submit: function(params) { |
||||
|
return request({ |
||||
|
url: '/riskcenter/v1/loanfinotherpolicyrecordapply/submit', |
||||
|
method: 'post', |
||||
|
data: params, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
// 流程审批(同意)
|
||||
|
complete: function(params) { |
||||
|
return request({ |
||||
|
url: '/riskcenter/v1/loanfinotherpolicyrecordapply/complete', |
||||
|
method: 'post', |
||||
|
data: params, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
// 流程审批(同意)
|
||||
|
companyToDivisionOperate: function(params) { |
||||
|
return request({ |
||||
|
url: '/riskcenter/v1/loanfinotherpolicyrecordapply/companyToDivisionOperate', |
||||
|
method: 'post', |
||||
|
data: params, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
// 流程审批(驳回)
|
||||
|
reject: function(params) { |
||||
|
return request({ |
||||
|
url: '/riskcenter/v1/loanfinotherpolicyrecordapply/reject', |
||||
|
method: 'post', |
||||
|
data: params, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
// 流程审批(终止)
|
||||
|
breakProcess: function(params) { |
||||
|
return request({ |
||||
|
url: '/riskcenter/v1/loanfinotherpolicyrecordapply/breakProcess', |
||||
|
method: 'post', |
||||
|
data: params, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
// 流程审批(撤回)
|
||||
|
revokeProcess: function(params) { |
||||
|
return request({ |
||||
|
url: '/riskcenter/v1/loanfinotherpolicyrecordapply/revokeProcess', |
||||
|
method: 'post', |
||||
|
data: params, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
// 审批流程(同意)获取下一环节
|
||||
|
getNextNodesForSubmit: function(data) { |
||||
|
return request({ |
||||
|
url: '/riskcenter/v1/loanfinotherpolicyrecordapply/getNextNodesForSubmit', |
||||
|
method: 'get', |
||||
|
params: data |
||||
|
}) |
||||
|
}, |
||||
|
// 审批流程(驳回)获取上一环节
|
||||
|
getPreviousNodesForReject: function(data) { |
||||
|
return request({ |
||||
|
url: '/riskcenter/v1/loanfinotherpolicyrecordapply/getPreviousNodesForReject', |
||||
|
method: 'get', |
||||
|
params: data |
||||
|
}) |
||||
|
} |
||||
|
} |
@ -0,0 +1,339 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<!--列表页面--> |
||||
|
<div v-show="viewState == 1"> |
||||
|
<button-bar view-title="其它融产品报备" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
||||
|
<!--Start查询列表部分--> |
||||
|
<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.applyCompany" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="申请部门"> |
||||
|
<el-input v-model="listQuery.params.department" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="申请人"> |
||||
|
<el-input v-model="listQuery.params.applicant" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="申请日期"> |
||||
|
<el-date-picker v-model="listQuery.params.createStartTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
||||
|
<span style="padding: 0 8px">至</span> |
||||
|
<el-date-picker v-model="listQuery.params.createEndTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div class="btn" style="text-align: center;"> |
||||
|
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button> |
||||
|
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!--End查询列表部分--> |
||||
|
<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> |
||||
|
<!--Start 主页面主要部分 --> |
||||
|
<div class=""> |
||||
|
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;" @selection-change="handleSelectionChange"> |
||||
|
<el-table-column type="selection" align="center" width="50"/> |
||||
|
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center"/> |
||||
|
<el-table-column label="操作" width="180px" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="primary" size="mini" @click="toEdit(scope.row)" :disabled="scope.row.nodeState =='发起申请' ? false : scope.row.nodeState == '待提交' ? false : true">办理</el-button> |
||||
|
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="状态" width="180px" header-align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span v-if="scope.row.nodeState=='待提交'" type="primary" size="mini">待提交</span> |
||||
|
<span v-else @click="flowRecord(scope.row)" class="bluezi">{{ scope.row.nodeState }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="分公司" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.applyCompany }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="申请部门" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.department }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="申请人" align="center" width="100"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.applicant }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="申请日期" align="center" width="100"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.applyDate }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="备注" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.remarks }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
<!--End 主页面主要部分--> |
||||
|
<div class="pages"> |
||||
|
<div class="tit"/> |
||||
|
<!-- 翻页 --> |
||||
|
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
||||
|
</div> |
||||
|
<!--End查询列表部分--> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!--款项结转新增及修改 --> |
||||
|
<otherfinancialproductsreportAdd v-show="viewState == 2 || viewState == 3" ref="divAdd" @doback="resetState" @reloadlist="getList"/> |
||||
|
<!--款项结转申请详情--> |
||||
|
<otherfinancialproductsreportInfo v-show="viewState == 4" 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 Pagination from '@/components/pagination' |
||||
|
import pageye from '@/components/pagination/pageye' |
||||
|
import ButtonBar from '@/components/ButtonBar' |
||||
|
import req from '@/api/otherfinancialproductsreport/otherfinancialproductsreport' |
||||
|
import { getOrgSidByPath } from '@/api/Common/dictcommons' |
||||
|
import { getStorage } from '@/utils/auth' |
||||
|
import otherfinancialproductsreportAdd from './otherfinancialproductsreportAdd' |
||||
|
import otherfinancialproductsreportInfo from './otherfinancialproductsreportInfo' |
||||
|
|
||||
|
export default { |
||||
|
name: 'OtherFinancialProductsReport', |
||||
|
components: { |
||||
|
Pagination, |
||||
|
pageye, |
||||
|
ButtonBar, |
||||
|
otherfinancialproductsreportAdd, |
||||
|
otherfinancialproductsreportInfo |
||||
|
}, |
||||
|
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, // 1、列表 2、新增 3、编辑 4、查看 |
||||
|
tableKey: 0, |
||||
|
list: [], |
||||
|
sids: [], // 用于导出的时候保存已选择的SIDs |
||||
|
FormLoading: false, |
||||
|
listLoading: false, |
||||
|
// 翻页 |
||||
|
listQuery: { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
applyCompany: '', |
||||
|
department: '', |
||||
|
applicant: '', |
||||
|
createOrgSid: '', |
||||
|
createStartTime: '', |
||||
|
createEndTime: '', |
||||
|
orgPath: '' |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
// 初始化变量 |
||||
|
this.init() |
||||
|
}, |
||||
|
mounted() { |
||||
|
// 在外部vue的window上添加postMessage的监听,而且绑定处理函数handleMessage |
||||
|
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 |
||||
|
} |
||||
|
}, |
||||
|
init() { |
||||
|
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => { |
||||
|
if (resp.success) { |
||||
|
this.listQuery.params.createOrgSid = resp.data |
||||
|
this.getList() |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 信息条数 获取点击时当前的sid |
||||
|
handleSelectionChange(row) { |
||||
|
const aa = [] |
||||
|
row.forEach(element => { |
||||
|
aa.push(element.sid) |
||||
|
}) |
||||
|
this.sids = aa |
||||
|
}, |
||||
|
// 表中序号 |
||||
|
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.createBySid = window.sessionStorage.getItem('userSid') |
||||
|
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
||||
|
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 = { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
applyCompany: '', |
||||
|
department: '', |
||||
|
applicant: '', |
||||
|
createOrgSid: '', |
||||
|
createStartTime: '', |
||||
|
createEndTime: '', |
||||
|
orgPath: '' |
||||
|
} |
||||
|
} |
||||
|
this.init() |
||||
|
}, |
||||
|
toEdit(row) { |
||||
|
this.viewState = 2 |
||||
|
this.$refs['divAdd'].showEdit(row) |
||||
|
}, |
||||
|
toInfo(row) { |
||||
|
this.viewState = 4 |
||||
|
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.deleteBySids(this.sids).then(resp => { |
||||
|
if (resp.success) { |
||||
|
this.$message({ type: 'success', message: resp.msg, showClose: true }) |
||||
|
} |
||||
|
this.getList() |
||||
|
loading.close() |
||||
|
}).catch(e => { |
||||
|
loading.close() |
||||
|
}) |
||||
|
}).catch(() => { |
||||
|
}) |
||||
|
}, |
||||
|
// 修改、编辑、详情返回列表页面 |
||||
|
resetState() { |
||||
|
this.viewState = 1 |
||||
|
}, |
||||
|
doClose() { |
||||
|
this.$store.dispatch('tagsView/delView', this.$route) |
||||
|
this.$router.go(-1) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
</style> |
@ -0,0 +1,283 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div> |
||||
|
<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="6"> |
||||
|
<div class="span-sty">分公司</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.applyCompany }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<div class="span-sty">申请部门</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.department }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<div class="span-sty">申请人</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.applicant }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<div class="span-sty">申请日期</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.applyDate }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty">备注</div> |
||||
|
<el-form-item><el-input v-model="formobj.remarks" clearable placeholder="" class="addinputInfo addinputw" /></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty" style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center">附件</div> |
||||
|
<el-form-item> |
||||
|
<upload-img ref="uploadImg" class="addinputInfo" v-model="image_list1" :limit="50" bucket="map" :upload-data="{ type: '0001' }"/> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<div class="title"> |
||||
|
其它融产品列表 |
||||
|
</div> |
||||
|
<el-table :key="tableKey" :data="formobj.policyList" :index="index" border style="width: 100%"> |
||||
|
<el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center"/> |
||||
|
<el-table-column label="操作" align="center" width="100"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="danger" size="mini" @click="handleDelete(scope.$index)">删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="其它融产品名称" align="center" min-width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.otherPolicyName }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="业务类型" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.busTypeValue }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="车辆大类" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.vehCategoryValue }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="车辆功能" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.vehTypeValue }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="最高融资额(元)" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.maxLoanAmount }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="期数" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.period }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="年利率" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.yearRatio }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="有效期至" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.validDateTo }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/otherfinancialproductsreport/otherfinancialproductsreport' |
||||
|
import { getOrgSidByPath, fetchBySid } from '@/api/Common/dictcommons' |
||||
|
import uploadImg from '@/components/uploadFile/uploadImg' |
||||
|
|
||||
|
export default { |
||||
|
name: 'OtherFinancialProductsReportAdd', |
||||
|
components: { |
||||
|
uploadImg |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
viewTitle: '', |
||||
|
submitdisabled: false, |
||||
|
tableKey: 0, |
||||
|
index: 0, |
||||
|
image_list1: [], |
||||
|
formobj: { |
||||
|
sid: '', |
||||
|
userSid: '', |
||||
|
applyCompany: '', |
||||
|
department: '', |
||||
|
applicant: '', |
||||
|
applyDate: '', |
||||
|
taskId: '', |
||||
|
instanceId: '', |
||||
|
remarks: '', |
||||
|
orgSidPath: '', |
||||
|
policySids: [], |
||||
|
annexPaths: [], |
||||
|
policyList: [] |
||||
|
}, |
||||
|
rules: {} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
showAdd(sids) { |
||||
|
this.viewTitle = '【新增】其它融产品报备' |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['form_obj'].clearValidate() |
||||
|
}) |
||||
|
req.policyRecordInit(sids).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.formobj = res.data |
||||
|
this.formobj.userSid = window.sessionStorage.getItem('userSid') |
||||
|
this.formobj.applicant = window.sessionStorage.getItem('name') |
||||
|
this.formobj.orgSidPath = window.sessionStorage.getItem('defaultOrgPath') |
||||
|
this.formobj.department = window.sessionStorage.getItem('defaultOrgPathName').substring(window.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1) |
||||
|
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => { |
||||
|
if (resp.success) { |
||||
|
fetchBySid(resp.data).then((respsone) => { |
||||
|
if (respsone.success) { |
||||
|
this.formobj.applyCompany = respsone.data.name |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
var newDate = new Date() |
||||
|
var date = { |
||||
|
year: newDate.getFullYear(), |
||||
|
month: newDate.getMonth() + 1, |
||||
|
day: newDate.getDate() |
||||
|
} |
||||
|
this.formobj.applyDate = date.year + '-' + (date.month >= 10 ? date.month : '0' + date.month) + '-' + (date.day >= 10 ? date.day : '0' + date.day) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
showEdit(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.annexPaths.length > 0) { |
||||
|
this.formobj.annexPaths.forEach((e) => { |
||||
|
this.image_list1.push({ |
||||
|
name: '', |
||||
|
url: e |
||||
|
}) |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
handleDelete(index) { |
||||
|
this.formobj.policyList.splice(index, 1) |
||||
|
}, |
||||
|
saveOrUpdate() { |
||||
|
if (this.formobj.policyList.length === 0) { |
||||
|
this.$message({ showClose: true, type: 'error', message: '其它融产品列表不能为空' }) |
||||
|
return |
||||
|
} else { |
||||
|
this.formobj.policyList.forEach((e) => { |
||||
|
this.formobj.policySids.push(e.otherPolicySid) |
||||
|
}) |
||||
|
} |
||||
|
this.$refs['form_obj'].validate((valid) => { |
||||
|
if (valid) { |
||||
|
this.submitdisabled = true |
||||
|
this.formobj.annexPaths = [] |
||||
|
if (this.image_list1.length > 0) { |
||||
|
this.image_list1.forEach((e) => { |
||||
|
this.formobj.annexPaths.push(e.url) |
||||
|
}) |
||||
|
} |
||||
|
req.saveOrUpdate(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.policyList.length === 0) { |
||||
|
this.$message({ showClose: true, type: 'error', message: '其它融产品列表不能为空' }) |
||||
|
return |
||||
|
} else { |
||||
|
this.formobj.policyList.forEach((e) => { |
||||
|
this.formobj.policySids.push(e.otherPolicySid) |
||||
|
}) |
||||
|
} |
||||
|
this.$refs['form_obj'].validate((valid) => { |
||||
|
if (valid) { |
||||
|
this.submitdisabled = true |
||||
|
this.formobj.annexPaths = [] |
||||
|
if (this.image_list1.length > 0) { |
||||
|
this.image_list1.forEach((e) => { |
||||
|
this.formobj.annexPaths.push(e.url) |
||||
|
}) |
||||
|
} |
||||
|
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: '', |
||||
|
userSid: '', |
||||
|
applyCompany: '', |
||||
|
department: '', |
||||
|
applicant: '', |
||||
|
applyDate: '', |
||||
|
taskId: '', |
||||
|
instanceId: '', |
||||
|
remarks: '', |
||||
|
orgSidPath: '', |
||||
|
policySids: [], |
||||
|
annexPaths: [], |
||||
|
policyList: [] |
||||
|
} |
||||
|
this.image_list1 = [] |
||||
|
this.submitdisabled = false |
||||
|
this.$emit('doback') |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.addinputInfo { |
||||
|
margin-left: 60px !important; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,142 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div> |
||||
|
<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="6"> |
||||
|
<div class="span-sty">分公司</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.applyCompany }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<div class="span-sty">申请部门</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.department }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<div class="span-sty">申请人</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.applicant }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<div class="span-sty">申请日期</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.applyDate }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<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" v-for="(item, index) in formobj.annexPaths" :key="index" :src="item" :preview-src-list="formobj.annexPaths" /></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<div class="title"> |
||||
|
其它融产品列表 |
||||
|
</div> |
||||
|
<el-table :key="tableKey" :data="formobj.policyList" :index="index" border style="width: 100%"> |
||||
|
<el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center"/> |
||||
|
<el-table-column label="其它融产品名称" align="center" min-width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.otherPolicyName }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="业务类型" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.busTypeValue }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="车辆大类" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.vehCategoryValue }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="车辆功能" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.vehTypeValue }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="最高融资额(元)" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.maxLoanAmount }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="期数" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.period }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="年利率" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.yearRatio }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="有效期至" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.validDateTo }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/otherfinancialproductsreport/otherfinancialproductsreport' |
||||
|
|
||||
|
export default { |
||||
|
name: 'OtherFinancialProductsReportInfo', |
||||
|
data() { |
||||
|
return { |
||||
|
viewTitle: '', |
||||
|
tableKey: 0, |
||||
|
index: 0, |
||||
|
formobj: { |
||||
|
sid: '', |
||||
|
userSid: '', |
||||
|
applyCompany: '', |
||||
|
department: '', |
||||
|
applicant: '', |
||||
|
applyDate: '', |
||||
|
taskId: '', |
||||
|
instanceId: '', |
||||
|
remarks: '', |
||||
|
orgSidPath: '', |
||||
|
annexPaths: [], |
||||
|
policyList: [] |
||||
|
}, |
||||
|
rules: {} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
showInfo(row) { |
||||
|
this.viewTitle = '其他融产品报备详情' |
||||
|
req.fetchBySid(row.sid).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.formobj = res.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
handleReturn() { |
||||
|
this.formobj = {} |
||||
|
this.$emit('doback') |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.addinputInfo { |
||||
|
margin-left: 60px !important; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,339 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div> |
||||
|
<div class="tab-header webtop"> |
||||
|
<div>{{ viewTitle }}</div> |
||||
|
<div> |
||||
|
<el-button type="primary" size="small" @click="openAgree('同意')">同 意</el-button> |
||||
|
<el-button type="danger" size="small" @click="openReject('驳回')">驳 回</el-button> |
||||
|
<el-button type="danger" size="small" @click="openStop('终止')">终 止</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class=""> |
||||
|
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
||||
|
<el-row style="border-top: 1px solid #e0e3eb"> |
||||
|
<el-col :span="6"> |
||||
|
<div class="span-sty">分公司</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.applyCompany }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<div class="span-sty">申请部门</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.department }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<div class="span-sty">申请人</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.applicant }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<div class="span-sty">申请日期</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.applyDate }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<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" v-for="(item, index) in formobj.annexPaths" :key="index" :src="item" :preview-src-list="formobj.annexPaths" /></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<div class="title"> |
||||
|
其它融产品列表 |
||||
|
</div> |
||||
|
<el-table :key="tableKey" :data="formobj.policyList" :index="index" border style="width: 100%"> |
||||
|
<el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center"/> |
||||
|
<el-table-column label="其它融产品名称" align="center" min-width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.otherPolicyName }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="业务类型" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.busTypeValue }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="车辆大类" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.vehCategoryValue }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="车辆功能" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.vehTypeValue }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="最高融资额(元)" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.maxLoanAmount }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="期数" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.period }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="年利率" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.yearRatio }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="有效期至" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.validDateTo }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- 选择待办人 的弹出框--> |
||||
|
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%"> |
||||
|
<el-form class="formadd" > |
||||
|
<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/otherfinancialproductsreport/otherfinancialproductsreport' |
||||
|
|
||||
|
export default { |
||||
|
name: 'OtherFinancialProductsReportByDivisionOperate', |
||||
|
data() { |
||||
|
return { |
||||
|
viewTitle: '', |
||||
|
tableKey: 0, |
||||
|
index: 0, |
||||
|
formobj: { |
||||
|
sid: '', |
||||
|
userSid: '', |
||||
|
applyCompany: '', |
||||
|
department: '', |
||||
|
applicant: '', |
||||
|
applyDate: '', |
||||
|
taskId: '', |
||||
|
instanceId: '', |
||||
|
remarks: '', |
||||
|
orgSidPath: '', |
||||
|
annexPaths: [], |
||||
|
policyList: [] |
||||
|
}, |
||||
|
rules: {}, |
||||
|
operation: '', // 点击操作按钮 |
||||
|
dialogList: { |
||||
|
comment: '' |
||||
|
}, |
||||
|
startTask: true, |
||||
|
current: { |
||||
|
taskDefKey: '', |
||||
|
taskName: '' // 当前环节名称 |
||||
|
}, |
||||
|
nextNode: {}, // 下一环节 |
||||
|
nodeDialogVisible: false, |
||||
|
currentLink: true, |
||||
|
// 环节所需参数 |
||||
|
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) // url解码unescape()已从web中移除,尽量不使用 |
||||
|
const obj = JSON.parse(decodeURIComponent(data)) |
||||
|
console.log('iframe页面获取的obj:', obj) |
||||
|
// 点击(同意、终止、驳回、驳回)操作时所需的参数 |
||||
|
this.linkByParameter.businessSid = obj.businessSid |
||||
|
this.linkByParameter.instanceId = obj.instanceId |
||||
|
this.linkByParameter.taskId = obj.taskId |
||||
|
this.linkByParameter.taskDefKey = obj.taskDefKey |
||||
|
this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath') |
||||
|
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid') |
||||
|
this.current.taskDefKey = obj.taskDefKey |
||||
|
this.current.taskName = obj.taskName |
||||
|
// 加载表单数据 |
||||
|
this.showInfo(obj.businessSid) |
||||
|
}, |
||||
|
mounted() { |
||||
|
window.parent.postMessage({ |
||||
|
cmd: 'returnHeight', |
||||
|
params: { |
||||
|
// 告诉父级页面,子页面的弹框高度。 |
||||
|
code: 2, |
||||
|
data: 350 + 'px' |
||||
|
} |
||||
|
}, '*') |
||||
|
}, |
||||
|
methods: { |
||||
|
showInfo(sid) { |
||||
|
this.viewTitle = '其他融产品报备详情' |
||||
|
req.fetchBySid(sid).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.formobj = res.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 同意 |
||||
|
openAgree(val) { |
||||
|
this.operation = val |
||||
|
this.currentLink = 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 |
||||
|
}) |
||||
|
}, |
||||
|
// 驳回 |
||||
|
openReject(val) { |
||||
|
this.operation = val |
||||
|
this.currentLink = true |
||||
|
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.dialogList.comment = '' |
||||
|
this.nodeDialogVisible = true |
||||
|
}, |
||||
|
reject() { |
||||
|
if (this.operation === '同意') { |
||||
|
this.handleAgree() |
||||
|
} else if (this.operation === '驳回') { |
||||
|
if (this.dialogList.comment === '') { |
||||
|
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' }) |
||||
|
} else { |
||||
|
this.handleReject() |
||||
|
} |
||||
|
} else if (this.operation === '终止') { |
||||
|
if (this.dialogList.comment === '') { |
||||
|
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' }) |
||||
|
} else { |
||||
|
this.handleStop() |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
/** 同意任务 */ |
||||
|
handleAgree() { |
||||
|
this.linkByParameter.comment = this.dialogList.comment |
||||
|
req.companyToDivisionOperate(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> |
||||
|
.rowClass{ |
||||
|
border-top: 1px solid #E0E3EB; |
||||
|
} |
||||
|
.addinputInfo { |
||||
|
margin-left: 60px !important; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,339 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div> |
||||
|
<div class="tab-header webtop"> |
||||
|
<div>{{ viewTitle }}</div> |
||||
|
<div> |
||||
|
<el-button type="primary" size="small" @click="openAgree('同意')">同 意</el-button> |
||||
|
<el-button type="danger" size="small" @click="openReject('驳回')">驳 回</el-button> |
||||
|
<el-button type="danger" size="small" @click="openStop('终止')">终 止</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class=""> |
||||
|
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
||||
|
<el-row style="border-top: 1px solid #e0e3eb"> |
||||
|
<el-col :span="6"> |
||||
|
<div class="span-sty">分公司</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.applyCompany }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<div class="span-sty">申请部门</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.department }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<div class="span-sty">申请人</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.applicant }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<div class="span-sty">申请日期</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.applyDate }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<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" v-for="(item, index) in formobj.annexPaths" :key="index" :src="item" :preview-src-list="formobj.annexPaths" /></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<div class="title"> |
||||
|
其它融产品列表 |
||||
|
</div> |
||||
|
<el-table :key="tableKey" :data="formobj.policyList" :index="index" border style="width: 100%"> |
||||
|
<el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center"/> |
||||
|
<el-table-column label="其它融产品名称" align="center" min-width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.otherPolicyName }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="业务类型" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.busTypeValue }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="车辆大类" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.vehCategoryValue }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="车辆功能" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.vehTypeValue }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="最高融资额(元)" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.maxLoanAmount }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="期数" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.period }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="年利率" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.yearRatio }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="有效期至" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.validDateTo }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- 选择待办人 的弹出框--> |
||||
|
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%"> |
||||
|
<el-form class="formadd" > |
||||
|
<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/otherfinancialproductsreport/otherfinancialproductsreport' |
||||
|
|
||||
|
export default { |
||||
|
name: 'OtherFinancialProductsReportDaiBan', |
||||
|
data() { |
||||
|
return { |
||||
|
viewTitle: '', |
||||
|
tableKey: 0, |
||||
|
index: 0, |
||||
|
formobj: { |
||||
|
sid: '', |
||||
|
userSid: '', |
||||
|
applyCompany: '', |
||||
|
department: '', |
||||
|
applicant: '', |
||||
|
applyDate: '', |
||||
|
taskId: '', |
||||
|
instanceId: '', |
||||
|
remarks: '', |
||||
|
orgSidPath: '', |
||||
|
annexPaths: [], |
||||
|
policyList: [] |
||||
|
}, |
||||
|
rules: {}, |
||||
|
operation: '', // 点击操作按钮 |
||||
|
dialogList: { |
||||
|
comment: '' |
||||
|
}, |
||||
|
startTask: true, |
||||
|
current: { |
||||
|
taskDefKey: '', |
||||
|
taskName: '' // 当前环节名称 |
||||
|
}, |
||||
|
nextNode: {}, // 下一环节 |
||||
|
nodeDialogVisible: false, |
||||
|
currentLink: true, |
||||
|
// 环节所需参数 |
||||
|
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) // url解码unescape()已从web中移除,尽量不使用 |
||||
|
const obj = JSON.parse(decodeURIComponent(data)) |
||||
|
console.log('iframe页面获取的obj:', obj) |
||||
|
// 点击(同意、终止、驳回、驳回)操作时所需的参数 |
||||
|
this.linkByParameter.businessSid = obj.businessSid |
||||
|
this.linkByParameter.instanceId = obj.instanceId |
||||
|
this.linkByParameter.taskId = obj.taskId |
||||
|
this.linkByParameter.taskDefKey = obj.taskDefKey |
||||
|
// this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath') |
||||
|
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid') |
||||
|
this.current.taskDefKey = obj.taskDefKey |
||||
|
this.current.taskName = obj.taskName |
||||
|
// 加载表单数据 |
||||
|
this.showInfo(obj.businessSid) |
||||
|
}, |
||||
|
mounted() { |
||||
|
window.parent.postMessage({ |
||||
|
cmd: 'returnHeight', |
||||
|
params: { |
||||
|
// 告诉父级页面,子页面的弹框高度。 |
||||
|
code: 2, |
||||
|
data: 350 + 'px' |
||||
|
} |
||||
|
}, '*') |
||||
|
}, |
||||
|
methods: { |
||||
|
showInfo(sid) { |
||||
|
this.viewTitle = '其他融产品报备详情' |
||||
|
req.fetchBySid(sid).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.formobj = res.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 同意 |
||||
|
openAgree(val) { |
||||
|
this.operation = val |
||||
|
this.currentLink = 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 |
||||
|
}) |
||||
|
}, |
||||
|
// 驳回 |
||||
|
openReject(val) { |
||||
|
this.operation = val |
||||
|
this.currentLink = true |
||||
|
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.dialogList.comment = '' |
||||
|
this.nodeDialogVisible = true |
||||
|
}, |
||||
|
reject() { |
||||
|
if (this.operation === '同意') { |
||||
|
this.handleAgree() |
||||
|
} else if (this.operation === '驳回') { |
||||
|
if (this.dialogList.comment === '') { |
||||
|
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' }) |
||||
|
} else { |
||||
|
this.handleReject() |
||||
|
} |
||||
|
} else if (this.operation === '终止') { |
||||
|
if (this.dialogList.comment === '') { |
||||
|
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' }) |
||||
|
} else { |
||||
|
this.handleStop() |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
/** 同意任务 */ |
||||
|
handleAgree() { |
||||
|
this.linkByParameter.comment = this.dialogList.comment |
||||
|
req.complete(this.linkByParameter).then((response) => { |
||||
|
if (response.success) { |
||||
|
this.$notify({ |
||||
|
title: '提示', |
||||
|
message: '执行成功', |
||||
|
type: 'success', |
||||
|
duration: 2000 |
||||
|
}) |
||||
|
this.nodeDialogVisible = false |
||||
|
// 子页面向父级页面传递值 |
||||
|
window.parent.postMessage({ |
||||
|
cmd: 'returnHeight', |
||||
|
params: { |
||||
|
// 操作成功,告诉父级页面关闭弹框 |
||||
|
code: 1 |
||||
|
} |
||||
|
}, '*') |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
/** 驳回任务 */ |
||||
|
handleReject() { |
||||
|
this.linkByParameter.comment = this.dialogList.comment |
||||
|
req.reject(this.linkByParameter).then((response) => { |
||||
|
if (response.success) { |
||||
|
this.$notify({ |
||||
|
title: '提示', |
||||
|
message: '执行成功', |
||||
|
type: 'success', |
||||
|
duration: 2000 |
||||
|
}) |
||||
|
this.nodeDialogVisible = false |
||||
|
// 子页面向父级页面传递值 |
||||
|
window.parent.postMessage({ |
||||
|
cmd: 'returnHeight', |
||||
|
params: { |
||||
|
// 操作成功,告诉父级页面关闭弹框 |
||||
|
code: 1 |
||||
|
} |
||||
|
}, '*') |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
/** 终止任务 */ |
||||
|
handleStop() { |
||||
|
this.linkByParameter.comment = this.dialogList.comment |
||||
|
req.breakProcess(this.linkByParameter).then((response) => { |
||||
|
if (response.success) { |
||||
|
this.$notify({ |
||||
|
title: '提示', |
||||
|
message: '执行成功', |
||||
|
type: 'success', |
||||
|
duration: 2000 |
||||
|
}) |
||||
|
this.nodeDialogVisible = false |
||||
|
// 子页面向父级页面传递值 |
||||
|
window.parent.postMessage({ |
||||
|
cmd: 'returnHeight', |
||||
|
params: { |
||||
|
// 操作成功,告诉父级页面关闭弹框 |
||||
|
code: 1 |
||||
|
} |
||||
|
}, '*') |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.rowClass{ |
||||
|
border-top: 1px solid #E0E3EB; |
||||
|
} |
||||
|
.addinputInfo { |
||||
|
margin-left: 60px !important; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,260 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div> |
||||
|
<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="6"> |
||||
|
<div class="span-sty">分公司</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.applyCompany }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<div class="span-sty">申请部门</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.department }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<div class="span-sty">申请人</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.applicant }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<div class="span-sty">申请日期</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.applyDate }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty">备注</div> |
||||
|
<el-form-item><el-input v-model="formobj.remarks" clearable placeholder="" class="addinputInfo addinputw" /></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty" style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center">附件</div> |
||||
|
<el-form-item> |
||||
|
<upload-img ref="uploadImg" class="addinputInfo" v-model="image_list1" :limit="50" bucket="map" :upload-data="{ type: '0001' }"/> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<div class="title"> |
||||
|
其它融产品列表 |
||||
|
</div> |
||||
|
<el-table :key="tableKey" :data="formobj.policyList" :index="index" border style="width: 100%"> |
||||
|
<el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center"/> |
||||
|
<el-table-column label="操作" align="center" width="100"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="danger" size="mini" @click="handleDelete(scope.$index)">删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="其它融产品名称" align="center" min-width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.otherPolicyName }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="业务类型" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.busTypeValue }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="车辆大类" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.vehCategoryValue }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="车辆功能" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.vehTypeValue }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="最高融资额(元)" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.maxLoanAmount }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="期数" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.period }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="年利率" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.yearRatio }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="有效期至" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.validDateTo }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/otherfinancialproductsreport/otherfinancialproductsreport' |
||||
|
import uploadImg from '@/components/uploadFile/uploadImg' |
||||
|
|
||||
|
export default { |
||||
|
name: 'OtherFinancialProductsReportEdit', |
||||
|
components: { |
||||
|
uploadImg |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
viewTitle: '', |
||||
|
submitdisabled: false, |
||||
|
tableKey: 0, |
||||
|
index: 0, |
||||
|
image_list1: [], |
||||
|
formobj: { |
||||
|
sid: '', |
||||
|
userSid: '', |
||||
|
applyCompany: '', |
||||
|
department: '', |
||||
|
applicant: '', |
||||
|
applyDate: '', |
||||
|
taskId: '', |
||||
|
instanceId: '', |
||||
|
remarks: '', |
||||
|
orgSidPath: '', |
||||
|
policySids: [], |
||||
|
annexPaths: [], |
||||
|
policyList: [] |
||||
|
}, |
||||
|
rules: {} |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
console.log('url:' + window.location.href) |
||||
|
var one = window.location.href.indexOf('&data') + 6 |
||||
|
const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用 |
||||
|
const obj = JSON.parse(decodeURIComponent(data)) |
||||
|
this.showInfo(obj.businessSid) |
||||
|
}, |
||||
|
mounted() { |
||||
|
window.parent.postMessage({ |
||||
|
cmd: 'returnHeight', |
||||
|
params: { |
||||
|
// 告诉父级页面,子页面的弹框高度。 |
||||
|
code: 2, |
||||
|
data: 350 + '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.annexPaths.length > 0) { |
||||
|
this.formobj.annexPaths.forEach((e) => { |
||||
|
this.image_list1.push({ |
||||
|
name: '', |
||||
|
url: e |
||||
|
}) |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
handleDelete(index) { |
||||
|
this.formobj.policyList.splice(index, 1) |
||||
|
}, |
||||
|
saveOrUpdate() { |
||||
|
if (this.formobj.policyList.length === 0) { |
||||
|
this.$message({ showClose: true, type: 'error', message: '其它融产品列表不能为空' }) |
||||
|
return |
||||
|
} else { |
||||
|
this.formobj.policyList.forEach((e) => { |
||||
|
this.formobj.policySids.push(e.otherPolicySid) |
||||
|
}) |
||||
|
} |
||||
|
this.$refs['form_obj'].validate((valid) => { |
||||
|
if (valid) { |
||||
|
this.submitdisabled = true |
||||
|
this.formobj.annexPaths = [] |
||||
|
if (this.image_list1.length > 0) { |
||||
|
this.image_list1.forEach((e) => { |
||||
|
this.formobj.annexPaths.push(e.url) |
||||
|
}) |
||||
|
} |
||||
|
req.saveOrUpdate(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.policyList.length === 0) { |
||||
|
this.$message({ showClose: true, type: 'error', message: '其它融产品列表不能为空' }) |
||||
|
return |
||||
|
} else { |
||||
|
this.formobj.policyList.forEach((e) => { |
||||
|
this.formobj.policySids.push(e.otherPolicySid) |
||||
|
}) |
||||
|
} |
||||
|
this.$refs['form_obj'].validate((valid) => { |
||||
|
if (valid) { |
||||
|
this.submitdisabled = true |
||||
|
this.formobj.annexPaths = [] |
||||
|
if (this.image_list1.length > 0) { |
||||
|
this.image_list1.forEach((e) => { |
||||
|
this.formobj.annexPaths.push(e.url) |
||||
|
}) |
||||
|
} |
||||
|
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> |
||||
|
.addinputInfo { |
||||
|
margin-left: 60px !important; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,210 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div> |
||||
|
<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="6"> |
||||
|
<div class="span-sty">分公司</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.applyCompany }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<div class="span-sty">申请部门</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.department }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<div class="span-sty">申请人</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.applicant }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<div class="span-sty">申请日期</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.applyDate }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<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" v-for="(item, index) in formobj.annexPaths" :key="index" :src="item" :preview-src-list="formobj.annexPaths" /></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<div class="title"> |
||||
|
其它融产品列表 |
||||
|
</div> |
||||
|
<el-table :key="tableKey" :data="formobj.policyList" :index="index" border style="width: 100%"> |
||||
|
<el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center"/> |
||||
|
<el-table-column label="其它融产品名称" align="center" min-width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.otherPolicyName }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="业务类型" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.busTypeValue }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="车辆大类" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.vehCategoryValue }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="车辆功能" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.vehTypeValue }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="最高融资额(元)" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.maxLoanAmount }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="期数" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.period }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="年利率" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.yearRatio }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="有效期至" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.validDateTo }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/otherfinancialproductsreport/otherfinancialproductsreport' |
||||
|
|
||||
|
export default { |
||||
|
name: 'OtherFinancialProductsReportYiBan', |
||||
|
data() { |
||||
|
return { |
||||
|
viewTitle: '', |
||||
|
tableKey: 0, |
||||
|
index: 0, |
||||
|
formobj: { |
||||
|
sid: '', |
||||
|
userSid: '', |
||||
|
applyCompany: '', |
||||
|
department: '', |
||||
|
applicant: '', |
||||
|
applyDate: '', |
||||
|
taskId: '', |
||||
|
instanceId: '', |
||||
|
remarks: '', |
||||
|
orgSidPath: '', |
||||
|
annexPaths: [], |
||||
|
policyList: [] |
||||
|
}, |
||||
|
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) // url解码unescape()已从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: 350 + 'px' |
||||
|
} |
||||
|
}, '*') |
||||
|
}, |
||||
|
methods: { |
||||
|
showInfo(sid) { |
||||
|
this.viewTitle = '其他融产品报备详情' |
||||
|
req.fetchBySid(sid).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.formobj = res.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
/** 确认撤回任务 */ |
||||
|
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> |
||||
|
.addinputInfo { |
||||
|
margin-left: 60px !important; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,70 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loantemplate; |
||||
|
|
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
/** |
||||
|
* @description: 公司定制金融方案模板 |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class LoanTemplate extends BaseEntity { |
||||
|
private static final long serialVersionUID = 4495609815807595267L; |
||||
|
|
||||
|
@ApiModelProperty("模板名称") |
||||
|
private String templateName; |
||||
|
@ApiModelProperty("备案编号") |
||||
|
private String billNo; |
||||
|
@ApiModelProperty("方案key") |
||||
|
private String showTypeKey; |
||||
|
@ApiModelProperty("方案value") |
||||
|
private String showTypeValue; |
||||
|
@ApiModelProperty("车型sid") |
||||
|
private String vehModelSid; |
||||
|
@ApiModelProperty("车型名称") |
||||
|
private String vehModel; |
||||
|
@ApiModelProperty("配置sid") |
||||
|
private String vehModelConfigSid; |
||||
|
@ApiModelProperty("常用配置名称") |
||||
|
private String vehModelConfig; |
||||
|
@ApiModelProperty("更多配置名称") |
||||
|
private String vehModelConfigMore; |
||||
|
@ApiModelProperty("单台指导价") |
||||
|
private BigDecimal vehPrice; |
||||
|
@ApiModelProperty("合格证公告型号") |
||||
|
private String vehNoticeModel; |
||||
|
@ApiModelProperty("备案日期") |
||||
|
private String filingDate; |
||||
|
@ApiModelProperty("申请部门sid") |
||||
|
private String applyDeptSid; |
||||
|
@ApiModelProperty("申请部门") |
||||
|
private String applyDept; |
||||
|
@ApiModelProperty("申请人") |
||||
|
private String createByName; |
||||
|
@ApiModelProperty("流程状态") |
||||
|
private String nodeState; |
||||
|
@ApiModelProperty("流程定义id") |
||||
|
private String procDefId; |
||||
|
@ApiModelProperty("环节定义id") |
||||
|
private String taskDefKey; |
||||
|
@ApiModelProperty("流程实例id") |
||||
|
private String procInstId; |
||||
|
private String taskId; |
||||
|
@ApiModelProperty("创建组织sid") |
||||
|
private String createOrgSid; |
||||
|
@ApiModelProperty("创建组织名称") |
||||
|
private String createOrgName; |
||||
|
@ApiModelProperty("使用组织sid") |
||||
|
private String useOrgSid; |
||||
|
@ApiModelProperty("使用组织名称") |
||||
|
private String useOrgName; |
||||
|
@ApiModelProperty("组织全路径") |
||||
|
private String orgSidPath; |
||||
|
@ApiModelProperty("使用状态:0正常,1禁用") |
||||
|
private int useState; |
||||
|
|
||||
|
} |
@ -0,0 +1,44 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loantemplate; |
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class LoanTemplateDto implements Dto { |
||||
|
private static final long serialVersionUID = 1058550108219302303L; |
||||
|
|
||||
|
private String sid; |
||||
|
@ApiModelProperty("用户sid") |
||||
|
private String userSid; |
||||
|
@ApiModelProperty("组织全路径sid") |
||||
|
private String orgPath; |
||||
|
|
||||
|
@ApiModelProperty("模板名称") |
||||
|
private String templateName; |
||||
|
@ApiModelProperty("方案key") |
||||
|
private String showTypeKey; |
||||
|
@ApiModelProperty("方案value") |
||||
|
private String showTypeValue; |
||||
|
@ApiModelProperty("车型sid") |
||||
|
private String vehModelSid; |
||||
|
@ApiModelProperty("车型名称") |
||||
|
private String vehModel; |
||||
|
@ApiModelProperty("配置sid") |
||||
|
private String vehModelConfigSid; |
||||
|
@ApiModelProperty("常用配置名称") |
||||
|
private String vehModelConfig; |
||||
|
@ApiModelProperty("更多配置名称") |
||||
|
private String vehModelConfigMore; |
||||
|
@ApiModelProperty("单台指导价") |
||||
|
private BigDecimal vehPrice; |
||||
|
@ApiModelProperty("合格证公告型号") |
||||
|
private String vehNoticeModel; |
||||
|
} |
@ -0,0 +1,74 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loantemplate; |
||||
|
|
||||
|
import com.yxt.anrui.riskcenter.api.loantemplate.flowable.*; |
||||
|
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.cloud.openfeign.FeignClient; |
||||
|
import org.springframework.cloud.openfeign.SpringQueryMap; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.PathVariable; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
|
||||
|
import javax.validation.Valid; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: 公司定制金融方案 |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
@Api(tags = "公司定制金融方案申请") |
||||
|
@FeignClient( |
||||
|
contextId = "anrui-riskcenter-LoanTemplate", |
||||
|
name = "anrui-riskcenter", |
||||
|
path = "v1/LoanTemplate", |
||||
|
fallback = LoanTemplateFeignFallback.class) |
||||
|
public interface LoanTemplateFeign { |
||||
|
|
||||
|
|
||||
|
@ApiOperation("分页列表") |
||||
|
@PostMapping("/listPage") |
||||
|
public ResultBean<PagerVo<LoanTemplateVo>> listPage(@RequestBody PagerQuery<LoanTemplateQuery> pq); |
||||
|
|
||||
|
@ApiOperation("新增、修改") |
||||
|
@PostMapping("/saveOrUpdate") |
||||
|
ResultBean<String> saveOrUpdate(@RequestBody LoanTemplateDto dto); |
||||
|
|
||||
|
@ApiOperation("提交") |
||||
|
@PostMapping("/submitTemplateApply") |
||||
|
public ResultBean submitTemplateApply(@Valid @RequestBody SubmitTemplateDto dto); |
||||
|
|
||||
|
@ApiOperation(value = "办理(同意)") |
||||
|
@PostMapping("/complete") |
||||
|
public ResultBean complete(@Valid @RequestBody TemplateCompleteDto query); |
||||
|
|
||||
|
@ApiOperation(value = "获取上一个环节") |
||||
|
@GetMapping(value = "/getPreviousNodesForReject") |
||||
|
ResultBean<List<TemplateApplyNodeVo>> getPreviousNodesForReject(@Valid @SpringQueryMap TemplateApplyNodeQuery query); |
||||
|
|
||||
|
@ApiOperation(value = "获取下一个环节") |
||||
|
@GetMapping(value = "/getNextNodesForSubmit") |
||||
|
ResultBean<List<TemplateApplyNodeVo>> getNextNodesForSubmit(@Valid @SpringQueryMap TemplateApplyNodeQuery query); |
||||
|
|
||||
|
@ApiOperation(value = "驳回任务") |
||||
|
@PostMapping(value = "/reject") |
||||
|
public ResultBean taskReject(@Valid @RequestBody TemplateApplyTaskQuery query); |
||||
|
|
||||
|
@ApiOperation(value = "撤回流程") |
||||
|
@PostMapping(value = "/revokeProcess") |
||||
|
public ResultBean revokeProcess(@Valid @RequestBody TemplateApplyTaskQuery query); |
||||
|
|
||||
|
@ApiOperation(value = "终止任务") |
||||
|
@PostMapping(value = "/breakProcess") |
||||
|
public ResultBean breakProcess(@Valid @RequestBody TemplateApplyTaskQuery query); |
||||
|
|
||||
|
@ApiOperation(value = "移动端详情") |
||||
|
@GetMapping(value = "/getTemplateApply/{sid}") |
||||
|
ResultBean<TemplateApplyVo> getTemplateApply(@PathVariable("sid") String sid); |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loantemplate; |
||||
|
|
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
@Component |
||||
|
public class LoanTemplateFeignFallback { |
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loantemplate; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class LoanTemplateQuery implements Query { |
||||
|
private static final long serialVersionUID = -3560204318836479977L; |
||||
|
|
||||
|
@ApiModelProperty("分公司") |
||||
|
private String useOrgName; |
||||
|
|
||||
|
@ApiModelProperty("模板名称") |
||||
|
private String templateName; |
||||
|
|
||||
|
@ApiModelProperty("使用状态:0正常,1禁用") |
||||
|
private String useStateKey; |
||||
|
|
||||
|
@ApiModelProperty("车型名称") |
||||
|
private String vehModel; |
||||
|
|
||||
|
//资方产品方案
|
||||
|
//其他融产品名称
|
||||
|
|
||||
|
@ApiModelProperty("申请日期开始时间") |
||||
|
private String filingDateStart; |
||||
|
@ApiModelProperty("申请日期结束时间") |
||||
|
private String filingDateEnd; |
||||
|
} |
@ -0,0 +1,44 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loantemplate; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class LoanTemplateVo implements Vo { |
||||
|
private static final long serialVersionUID = -7945086879973486919L; |
||||
|
|
||||
|
private String sid; |
||||
|
@ApiModelProperty("流程状态") |
||||
|
private String nodeState; |
||||
|
@ApiModelProperty("使用状态") |
||||
|
private String useStateValue; |
||||
|
@ApiModelProperty("分公司") |
||||
|
private String useOrgName; |
||||
|
@ApiModelProperty("申请部门") |
||||
|
private String applyDept; |
||||
|
@ApiModelProperty("申请人") |
||||
|
private String createByName; |
||||
|
@ApiModelProperty("申请日期") |
||||
|
private String filingDate; |
||||
|
@ApiModelProperty("模板名称") |
||||
|
private String templateName; |
||||
|
|
||||
|
@ApiModelProperty("方案value") |
||||
|
private String showTypeValue; |
||||
|
@ApiModelProperty("车型名称") |
||||
|
private String vehModel; |
||||
|
@ApiModelProperty("车型sid") |
||||
|
private String vehModelSid; |
||||
|
@ApiModelProperty("配置sid") |
||||
|
private String vehModelConfigSid; |
||||
|
|
||||
|
//资方产品方案
|
||||
|
//其他融产品名称
|
||||
|
|
||||
|
} |
@ -0,0 +1,9 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loantemplate; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
public class TemplateApplyVo { |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loantemplate.flowable; |
||||
|
|
||||
|
import com.yxt.anrui.riskcenter.api.loantemplate.LoanTemplateDto; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class SubmitTemplateDto extends LoanTemplateDto { |
||||
|
|
||||
|
private static final long serialVersionUID = 3835516621822161977L; |
||||
|
@ApiModelProperty("流程实例id") |
||||
|
private String instanceId; |
||||
|
@ApiModelProperty("任务id") |
||||
|
private String taskId; |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loantemplate.flowable; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class TemplateApplyNodeQuery implements Query { |
||||
|
|
||||
|
private static final long serialVersionUID = 7063642923429631900L; |
||||
|
@ApiModelProperty(value = "环节定义id") |
||||
|
private String taskDefKey; |
||||
|
@ApiModelProperty(value = "业务sid") |
||||
|
private String businessSid; |
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loantemplate.flowable; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class TemplateApplyNodeVo implements Vo { |
||||
|
|
||||
|
private static final long serialVersionUID = 1961081384184514415L; |
||||
|
@ApiModelProperty(value = "节点名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty(value = "节点id") |
||||
|
private String id; |
||||
|
@ApiModelProperty(value = "审批组") |
||||
|
private List<String> candidateGroups; |
||||
|
@ApiModelProperty(value = "是否是最后环节") |
||||
|
private String endTask; |
||||
|
} |
@ -0,0 +1,45 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loantemplate.flowable; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class TemplateApplyTaskQuery implements Query { |
||||
|
private static final long serialVersionUID = 5105018029574079051L; |
||||
|
|
||||
|
/** |
||||
|
* 终止、驳回、撤回 |
||||
|
*/ |
||||
|
@ApiModelProperty("任务Id") |
||||
|
@NotBlank(message = "参数错误:taskId") |
||||
|
private String taskId; |
||||
|
/** |
||||
|
* 终止、驳回、撤回 |
||||
|
*/ |
||||
|
@ApiModelProperty("业务sid") |
||||
|
@NotBlank(message = "参数错误:businessSid") |
||||
|
private String businessSid; |
||||
|
/** |
||||
|
* 终止、驳回 |
||||
|
*/ |
||||
|
@ApiModelProperty("任务意见") |
||||
|
private String comment; |
||||
|
/** |
||||
|
* 终止、撤回、驳回 |
||||
|
*/ |
||||
|
@ApiModelProperty("用户Sid") |
||||
|
private String userSid; |
||||
|
/** |
||||
|
* 终止 |
||||
|
*/ |
||||
|
@ApiModelProperty("流程实例Id") |
||||
|
private String instanceId; |
||||
|
} |
@ -0,0 +1,38 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loantemplate.flowable; |
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class TemplateCompleteDto implements Dto { |
||||
|
|
||||
|
@ApiModelProperty(value = "用户sid") |
||||
|
@NotBlank(message = "参数错误:userSid") |
||||
|
private String userSid; |
||||
|
@ApiModelProperty(value = "用户全路径sid") |
||||
|
@NotBlank(message = "用户全路径不能为空") |
||||
|
private String orgSidPath; |
||||
|
@ApiModelProperty(value = "节点id") |
||||
|
@NotBlank(message = "参数错误:taskDefKey") |
||||
|
private String taskDefKey; |
||||
|
@ApiModelProperty(value = "任务id") |
||||
|
@NotBlank(message = "参数错误:taskId") |
||||
|
private String taskId; |
||||
|
@ApiModelProperty(value = "流程id") |
||||
|
@NotBlank(message = "参数错误:instanceId") |
||||
|
private String instanceId; |
||||
|
@ApiModelProperty(value = "意见") |
||||
|
private String comment; |
||||
|
@ApiModelProperty(value = "业务sid") |
||||
|
@NotBlank(message = "参数错误:businessSid") |
||||
|
private String businessSid; |
||||
|
|
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loantemplateinstall; |
||||
|
|
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class LoanTemplateInstall extends BaseEntity { |
||||
|
private static final long serialVersionUID = 8653351227525069709L; |
||||
|
@ApiModelProperty("模板sid") |
||||
|
private String templateSid; |
||||
|
@ApiModelProperty("上装配置sid") |
||||
|
private String vehInstallModelSid; |
||||
|
@ApiModelProperty("上装融资价格") |
||||
|
private BigDecimal vehInstallPrice; |
||||
|
@ApiModelProperty("上装备注说明") |
||||
|
private String vehInstallRemark; |
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loantemplatetrailer; |
||||
|
|
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class LoanTemplateTrailer extends BaseEntity { |
||||
|
private static final long serialVersionUID = -696421927777953553L; |
||||
|
@ApiModelProperty("模板sid") |
||||
|
private String templateSid; |
||||
|
@ApiModelProperty("挂车配置sid") |
||||
|
private String vehTrailerModelSid; |
||||
|
@ApiModelProperty("挂车融资价格") |
||||
|
private BigDecimal vehTrailerPrice; |
||||
|
@ApiModelProperty("挂车同车型合格证文件") |
||||
|
private String vehTrailerCertificateFile; |
||||
|
@ApiModelProperty("挂车备注说明") |
||||
|
private String vehTrailerRemark; |
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
package com.yxt.anrui.riskcenter.biz.loantemplate; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants; |
||||
|
import com.yxt.anrui.riskcenter.api.loantemplate.LoanTemplate; |
||||
|
import com.yxt.anrui.riskcenter.api.loantemplate.LoanTemplateVo; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
@Mapper |
||||
|
public interface LoanTemplateMapper extends BaseMapper<LoanTemplate> { |
||||
|
IPage<LoanTemplateVo> listPageVo(IPage<LoanTemplate> page, @Param(Constants.WRAPPER) QueryWrapper<LoanTemplate> qw); |
||||
|
|
||||
|
int updateFlowFiled(Map<String, Object> map); |
||||
|
} |
@ -0,0 +1,43 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.yxt.anrui.riskcenter.biz.loantemplate.LoanTemplateMapper"> |
||||
|
<select id="listPageVo" resultType="com.yxt.anrui.riskcenter.api.loantemplate.LoanTemplateVo"> |
||||
|
select lote.sid, |
||||
|
lote.templateName, |
||||
|
lote.useOrgName, |
||||
|
lote.createByName, |
||||
|
case lote.useState |
||||
|
when 0 then '正常' |
||||
|
when 1 then '禁用' |
||||
|
end useStateValue, |
||||
|
lote.applyDept, |
||||
|
lote.filingDate, |
||||
|
lote.showTypeValue, |
||||
|
lote.vehModel, |
||||
|
lote.vehModelSid, |
||||
|
lote.vehModelConfigSid |
||||
|
from loan_template lote |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
order by id desc |
||||
|
</select> |
||||
|
|
||||
|
<update id="updateFlowFiled"> |
||||
|
UPDATE loan_template |
||||
|
SET nodeState=#{nodeState} |
||||
|
<if test="taskDefKey != null and taskDefKey != ''"> |
||||
|
, taskDefKey=#{taskDefKey} |
||||
|
</if> |
||||
|
<if test="procDefId != null and procDefId != ''"> |
||||
|
, procDefId=#{procDefId} |
||||
|
</if> |
||||
|
<if test="procInsId != null and procInsId != ''"> |
||||
|
, procInstId=#{procInsId} |
||||
|
</if> |
||||
|
<if test="taskId != null and taskId != ''"> |
||||
|
, taskId=#{taskId} |
||||
|
</if> |
||||
|
WHERE sid = #{sid} |
||||
|
</update> |
||||
|
</mapper> |
@ -0,0 +1,84 @@ |
|||||
|
package com.yxt.anrui.riskcenter.biz.loantemplate; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables; |
||||
|
import com.yxt.anrui.riskcenter.api.loantemplate.*; |
||||
|
import com.yxt.anrui.riskcenter.api.loantemplate.flowable.*; |
||||
|
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 org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
@Api(tags = "公司定制金融方案申请") |
||||
|
@RestController |
||||
|
@RequestMapping("v1/LoanTemplate") |
||||
|
public class LoanTemplateRest implements LoanTemplateFeign { |
||||
|
|
||||
|
@Autowired |
||||
|
private LoanTemplateService loanTemplateService; |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<PagerVo<LoanTemplateVo>> listPage(PagerQuery<LoanTemplateQuery> pq) { |
||||
|
ResultBean<PagerVo<LoanTemplateVo>> rb = ResultBean.fireFail(); |
||||
|
PagerVo<LoanTemplateVo> pv = loanTemplateService.listPageVo(pq); |
||||
|
return rb.success().setData(pv); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<String> saveOrUpdate(LoanTemplateDto dto) { |
||||
|
return loanTemplateService.saveOrUpdateApply(dto); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean submitTemplateApply(SubmitTemplateDto dto) { |
||||
|
return loanTemplateService.submitTemplateApply(dto); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean complete(TemplateCompleteDto query) { |
||||
|
BusinessVariables bv = new BusinessVariables(); |
||||
|
BeanUtil.copyProperties(query, bv); |
||||
|
bv.setModelId(""); |
||||
|
return loanTemplateService.complete(bv); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<List<TemplateApplyNodeVo>> getPreviousNodesForReject(TemplateApplyNodeQuery query) { |
||||
|
return loanTemplateService.getPreviousNodesForReject(query); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<List<TemplateApplyNodeVo>> getNextNodesForSubmit(TemplateApplyNodeQuery query) { |
||||
|
return loanTemplateService.getNextNodesForSubmit(query); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean taskReject(TemplateApplyTaskQuery query) { |
||||
|
return loanTemplateService.taskReject(query); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean revokeProcess(TemplateApplyTaskQuery query) { |
||||
|
return loanTemplateService.revokeProcess(query); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean breakProcess(TemplateApplyTaskQuery query) { |
||||
|
return loanTemplateService.breakProcess(query); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<TemplateApplyVo> getTemplateApply(String sid) { |
||||
|
return loanTemplateService.getTemplateApply(sid); |
||||
|
} |
||||
|
} |
@ -0,0 +1,456 @@ |
|||||
|
package com.yxt.anrui.riskcenter.biz.loantemplate; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import cn.hutool.core.date.DateUtil; |
||||
|
import com.alibaba.fastjson.JSON; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.google.common.util.concurrent.ThreadFactoryBuilder; |
||||
|
import com.yxt.anrui.flowable.api.flow.FlowableFeign; |
||||
|
import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo; |
||||
|
import com.yxt.anrui.flowable.api.flowtask.FlowTaskFeign; |
||||
|
import com.yxt.anrui.flowable.api.flowtask.FlowTaskVo; |
||||
|
import com.yxt.anrui.flowable.api.flowtask.LatestTaskVo; |
||||
|
import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables; |
||||
|
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign; |
||||
|
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo; |
||||
|
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; |
||||
|
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; |
||||
|
import com.yxt.anrui.portal.api.sysuser.SysUserVo; |
||||
|
import com.yxt.anrui.riskcenter.api.loantemplate.*; |
||||
|
import com.yxt.anrui.riskcenter.api.loantemplate.flowable.SubmitTemplateDto; |
||||
|
import com.yxt.anrui.riskcenter.api.loantemplate.flowable.TemplateApplyNodeQuery; |
||||
|
import com.yxt.anrui.riskcenter.api.loantemplate.flowable.TemplateApplyNodeVo; |
||||
|
import com.yxt.anrui.riskcenter.api.loantemplate.flowable.TemplateApplyTaskQuery; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.common.base.utils.PagerUtil; |
||||
|
import com.yxt.common.base.utils.StringUtils; |
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import com.yxt.messagecenter.api.message.MessageFeign; |
||||
|
import com.yxt.messagecenter.api.message.MessageFlowVo; |
||||
|
import com.yxt.messagecenter.api.message.MessageFlowableQuery; |
||||
|
import org.apache.tomcat.util.threads.ThreadPoolExecutor; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.*; |
||||
|
import java.util.concurrent.*; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
@Service |
||||
|
public class LoanTemplateService extends MybatisBaseService<LoanTemplateMapper, LoanTemplate> { |
||||
|
|
||||
|
@Autowired |
||||
|
private SysUserFeign sysUserFeign; |
||||
|
@Autowired |
||||
|
private SysStaffOrgFeign sysStaffOrgFeign; |
||||
|
@Autowired |
||||
|
private SysOrganizationFeign sysOrganizationFeign; |
||||
|
@Autowired |
||||
|
private FlowableFeign flowableFeign; |
||||
|
@Autowired |
||||
|
private MessageFeign messageFeign; |
||||
|
@Autowired |
||||
|
private FlowTaskFeign flowTaskFeign; |
||||
|
|
||||
|
|
||||
|
public PagerVo<LoanTemplateVo> listPageVo(PagerQuery<LoanTemplateQuery> pq) { |
||||
|
LoanTemplateQuery query = pq.getParams(); |
||||
|
QueryWrapper<LoanTemplate> qw = new QueryWrapper<>(); |
||||
|
if (query != null) { |
||||
|
//分公司
|
||||
|
if (StringUtils.isNotBlank(query.getUseOrgName())) { |
||||
|
qw.like("useOrgName", query.getUseOrgName()); |
||||
|
} |
||||
|
//模板名称
|
||||
|
if (StringUtils.isNotBlank(query.getTemplateName())) { |
||||
|
qw.like("templateName", query.getTemplateName()); |
||||
|
} |
||||
|
//使用状态
|
||||
|
if (StringUtils.isNotBlank(query.getUseStateKey())) { |
||||
|
qw.eq("useState", query.getUseStateKey()); |
||||
|
} |
||||
|
//ToDo:资方产品政策、其他融产品名称
|
||||
|
//申请日期开始时间
|
||||
|
String applicationDateStart = query.getFilingDateStart(); |
||||
|
//申请日期结束时间
|
||||
|
String applicationDateEnd = query.getFilingDateEnd(); |
||||
|
qw.apply(StringUtils.isNotBlank(applicationDateStart), "date_format (filingDate,'%Y-%m-%d') >= date_format('" + applicationDateStart + "','%Y-%m-%d')"). |
||||
|
apply(StringUtils.isNotBlank(applicationDateEnd), "date_format (filingDate,'%Y-%m-%d') <= date_format('" + applicationDateEnd + "','%Y-%m-%d')" |
||||
|
); |
||||
|
|
||||
|
} |
||||
|
IPage<LoanTemplate> page = PagerUtil.queryToPage(pq); |
||||
|
IPage<LoanTemplateVo> pagging = baseMapper.listPageVo(page, qw); |
||||
|
PagerVo<LoanTemplateVo> p = PagerUtil.pageToVo(pagging, null); |
||||
|
return p; |
||||
|
} |
||||
|
|
||||
|
public ResultBean<String> saveOrUpdateApply(LoanTemplateDto dto) { |
||||
|
ResultBean<String> rb = ResultBean.fireFail(); |
||||
|
String sid = dto.getSid(); |
||||
|
if (StringUtils.isBlank(sid)) { |
||||
|
//新增
|
||||
|
LoanTemplate loanTemplate = new LoanTemplate(); |
||||
|
BeanUtil.copyProperties(dto, loanTemplate, sid); |
||||
|
loanTemplate.setCreateBySid(dto.getUserSid()); |
||||
|
//查询申请人
|
||||
|
ResultBean<SysUserVo> userVoResultBean = sysUserFeign.fetchBySid(dto.getUserSid()); |
||||
|
if (userVoResultBean.getData() != null) { |
||||
|
loanTemplate.setCreateByName(userVoResultBean.getData().getName()); |
||||
|
} |
||||
|
//申请人组织全路径
|
||||
|
String orgPath = dto.getOrgPath(); |
||||
|
loanTemplate.setOrgSidPath(orgPath); |
||||
|
String useOrgSid = sysStaffOrgFeign.getOrgSidByPath(orgPath).getData(); |
||||
|
loanTemplate.setUseOrgSid(useOrgSid); |
||||
|
loanTemplate.setCreateOrgSid(useOrgSid); |
||||
|
//创建组织使用组织
|
||||
|
ResultBean<SysOrganizationVo> organizationResultBean = sysOrganizationFeign.fetchBySid(useOrgSid); |
||||
|
if (organizationResultBean.getData() != null) { |
||||
|
loanTemplate.setCreateOrgName(organizationResultBean.getData().getName()); |
||||
|
loanTemplate.setUseOrgName(organizationResultBean.getData().getName()); |
||||
|
} |
||||
|
//申请部门
|
||||
|
List<String> orgList = Arrays.asList(orgPath.split("/")); |
||||
|
String deptSid = orgList.get(orgList.size() - 1); |
||||
|
ResultBean<SysOrganizationVo> sysOrganizationVoResultBean = sysOrganizationFeign.fetchBySid(deptSid); |
||||
|
if (sysOrganizationVoResultBean.getData() != null) { |
||||
|
loanTemplate.setApplyDept(sysOrganizationVoResultBean.getData().getName()); |
||||
|
loanTemplate.setApplyDeptSid(deptSid); |
||||
|
} |
||||
|
loanTemplate.setFilingDate(DateUtil.today()); |
||||
|
baseMapper.insert(loanTemplate); |
||||
|
sid = loanTemplate.getSid(); |
||||
|
} else { |
||||
|
//修改
|
||||
|
LoanTemplate loanTemplate = fetchBySid(sid); |
||||
|
if (loanTemplate == null) { |
||||
|
return rb.setMsg("该申请不存在"); |
||||
|
} |
||||
|
BeanUtil.copyProperties(dto, loanTemplate, "sid"); |
||||
|
baseMapper.updateById(loanTemplate); |
||||
|
} |
||||
|
return rb.success().setData(sid); |
||||
|
} |
||||
|
|
||||
|
public ResultBean submitTemplateApply(SubmitTemplateDto dto) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
LoanTemplate loanTemplate = fetchBySid(dto.getSid()); |
||||
|
int r = submitBusinessData(dto, loanTemplate); |
||||
|
if (r == 3) { |
||||
|
return rb.setMsg("该申请不存在"); |
||||
|
} |
||||
|
if (r == 0) { |
||||
|
return rb.setMsg("操作失败!提交的数据不一致"); |
||||
|
} |
||||
|
ResultBean<String> resultBean = saveOrUpdateApply(dto); |
||||
|
if (!resultBean.getSuccess()) { |
||||
|
return rb.setMsg(resultBean.getMsg()); |
||||
|
} |
||||
|
|
||||
|
String businessSid = resultBean.getData(); |
||||
|
loanTemplate = fetchBySid(businessSid); |
||||
|
//创建BusinessVariables实体对象
|
||||
|
BusinessVariables bv = new BusinessVariables(); |
||||
|
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
|
||||
|
Map<String, Object> variables = new HashMap<>(); |
||||
|
Map<String, Object> appMap = new HashMap<>(); |
||||
|
appMap.put("sid", businessSid); |
||||
|
variables.put("app", appMap); |
||||
|
//用户的部门全路径sid
|
||||
|
bv.setOrgSidPath(loanTemplate.getOrgSidPath()); |
||||
|
bv.setBusinessSid(businessSid); |
||||
|
bv.setUserSid(dto.getUserSid()); |
||||
|
bv.setFormVariables(variables); |
||||
|
if (r == 1) { |
||||
|
//ToDo:流程定义id
|
||||
|
bv.setModelId(""); |
||||
|
ResultBean<UpdateFlowFieldVo> voResultBean = flowableFeign.startProcess(bv); |
||||
|
if (!voResultBean.getSuccess()) { |
||||
|
return rb.setMsg(voResultBean.getMsg()); |
||||
|
} |
||||
|
UpdateFlowFieldVo ufVo = voResultBean.getData(); |
||||
|
updateFlowFiled(BeanUtil.beanToMap(ufVo)); |
||||
|
loanTemplate = fetchBySid(businessSid); |
||||
|
//==================================添加线程
|
||||
|
try { |
||||
|
ThreadFactory namedThreadFactory = new ThreadFactoryBuilder() |
||||
|
.setNameFormat("demo-pool-%d").build(); |
||||
|
ExecutorService pool = new ThreadPoolExecutor(2, 100, |
||||
|
0L, TimeUnit.MILLISECONDS, |
||||
|
new LinkedBlockingQueue<Runnable>(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); |
||||
|
LoanTemplate finalLoanTemplate = loanTemplate; |
||||
|
Future future1 = pool.submit(() -> { |
||||
|
//极光推送
|
||||
|
MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); |
||||
|
MessageFlowVo messageFlowVo = new MessageFlowVo(); |
||||
|
BeanUtil.copyProperties(ufVo, messageFlowVo); |
||||
|
messageFlowableQuery.setUfVo(messageFlowVo); |
||||
|
messageFlowableQuery.setAppMap(appMap); |
||||
|
messageFlowableQuery.setBusinessSid(businessSid); |
||||
|
messageFlowableQuery.setModuleName("公司定制金融方案备案申请"); |
||||
|
messageFlowableQuery.setMsgContent(finalLoanTemplate.getCreateByName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批"); |
||||
|
messageFlowableQuery.setMsgTitle("公司定制金融方案备案"); |
||||
|
ResultBean<String> stringResultBean = messageFeign.pushMessage(messageFlowableQuery); |
||||
|
}); |
||||
|
} catch (Exception e) { |
||||
|
e.printStackTrace(); |
||||
|
} |
||||
|
//==================================添加线程
|
||||
|
return voResultBean; |
||||
|
} |
||||
|
if (r == 2) { |
||||
|
// ToDo:驳回到发起人后再次提交
|
||||
|
if (StringUtils.isBlank(dto.getInstanceId())) { |
||||
|
return rb.setMsg("参数错误:instanceId"); |
||||
|
} |
||||
|
bv.setTaskId(loanTemplate.getTaskId()); |
||||
|
bv.setTaskDefKey(loanTemplate.getTaskDefKey()); |
||||
|
bv.setComment("重新提交"); |
||||
|
bv.setInstanceId(dto.getInstanceId()); |
||||
|
return complete(bv); |
||||
|
} |
||||
|
return rb; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 更新流程的状态 |
||||
|
* |
||||
|
* @param map |
||||
|
* @return |
||||
|
*/ |
||||
|
private int updateFlowFiled(Map<String, Object> map) { |
||||
|
return baseMapper.updateFlowFiled(map); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 判断提交的流程是否被允许 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return |
||||
|
*/ |
||||
|
private synchronized int submitBusinessData(SubmitTemplateDto dto, LoanTemplate loanTemplate) { |
||||
|
int r = 0; |
||||
|
if (StringUtils.isBlank(dto.getSid())) { |
||||
|
r = 1; |
||||
|
} else { |
||||
|
if (loanTemplate != null) { |
||||
|
String businessTaskId = loanTemplate.getTaskId(); |
||||
|
if (StringUtils.isBlank(businessTaskId) && StringUtils.isBlank(dto.getTaskId())) { |
||||
|
//新提交
|
||||
|
r = 1; |
||||
|
} else if (StringUtils.isNotBlank(businessTaskId) && businessTaskId.equals(dto.getTaskId())) { |
||||
|
//二次提交//只有数据一致的时候才能进行下一步
|
||||
|
r = 2; |
||||
|
} |
||||
|
} else { |
||||
|
r = 3; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
return r; |
||||
|
} |
||||
|
|
||||
|
public ResultBean complete(BusinessVariables bv) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
String businessSid = bv.getBusinessSid(); |
||||
|
LoanTemplate loanTemplate = fetchBySid(businessSid); |
||||
|
Map<String, Object> variables = new HashMap<>(); |
||||
|
Map<String, Object> appMap = new HashMap<>(); |
||||
|
appMap.put("sid", businessSid); |
||||
|
variables.put("app", appMap); |
||||
|
bv.setFormVariables(variables); |
||||
|
bv.setOrgSidPath(loanTemplate.getOrgSidPath()); |
||||
|
bv.setModelId(loanTemplate.getProcDefId()); |
||||
|
if (bv.getTaskId().equals(loanTemplate.getTaskId())) { |
||||
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.handleProsess(bv); |
||||
|
if (!resultBean.getSuccess()) { |
||||
|
return rb.setMsg(resultBean.getMsg()); |
||||
|
} |
||||
|
UpdateFlowFieldVo ufVo = resultBean.getData(); |
||||
|
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); |
||||
|
if ("Event_end".equals(resultBean.getData().getTaskDefKey())) { |
||||
|
|
||||
|
} else { |
||||
|
//极光推送
|
||||
|
loanTemplate = fetchBySid(businessSid); |
||||
|
MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); |
||||
|
MessageFlowVo messageFlowVo = new MessageFlowVo(); |
||||
|
BeanUtil.copyProperties(ufVo, messageFlowVo); |
||||
|
messageFlowVo.setProcDefId(loanTemplate.getProcDefId()); |
||||
|
messageFlowVo.setProcInsId(loanTemplate.getProcInstId()); |
||||
|
messageFlowableQuery.setUfVo(messageFlowVo); |
||||
|
messageFlowableQuery.setAppMap(appMap); |
||||
|
messageFlowableQuery.setBusinessSid(businessSid); |
||||
|
messageFlowableQuery.setModuleName("公司定制金融方案备案申请"); |
||||
|
messageFlowableQuery.setMsgContent(loanTemplate.getCreateByName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批"); |
||||
|
messageFlowableQuery.setMsgTitle("公司定制金融方案备案"); |
||||
|
ResultBean<String> stringResultBean = messageFeign.pushMessage(messageFlowableQuery); |
||||
|
} |
||||
|
return rb.success().setData(resultBean.getData()); |
||||
|
} else { |
||||
|
return rb.setMsg("操作失败!提交的数据不一致"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public ResultBean<List<TemplateApplyNodeVo>> getPreviousNodesForReject(TemplateApplyNodeQuery query) { |
||||
|
ResultBean<List<TemplateApplyNodeVo>> rb = ResultBean.fireFail(); |
||||
|
BusinessVariables bv = new BusinessVariables(); |
||||
|
BeanUtil.copyProperties(query, bv); |
||||
|
LoanTemplate loanTemplate = fetchBySid(query.getBusinessSid()); |
||||
|
bv.setModelId(loanTemplate.getProcDefId()); |
||||
|
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getPreviousNodesForReject(bv); |
||||
|
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给TemplateApplyNodeVo
|
||||
|
List<TemplateApplyNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), TemplateApplyNodeVo.class)).collect(Collectors.toList()); |
||||
|
return rb.success().setData(voList); |
||||
|
} |
||||
|
|
||||
|
public ResultBean<List<TemplateApplyNodeVo>> getNextNodesForSubmit(TemplateApplyNodeQuery query) { |
||||
|
ResultBean<List<TemplateApplyNodeVo>> rb = ResultBean.fireFail(); |
||||
|
BusinessVariables bv = new BusinessVariables(); |
||||
|
BeanUtil.copyProperties(query, bv); |
||||
|
LoanTemplate loanTemplate = fetchBySid(query.getBusinessSid()); |
||||
|
bv.setModelId(loanTemplate.getProcDefId()); |
||||
|
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv); |
||||
|
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给TemplateApplyNodeVo
|
||||
|
List<TemplateApplyNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), TemplateApplyNodeVo.class)).collect(Collectors.toList()); |
||||
|
return rb.success().setData(voList); |
||||
|
} |
||||
|
|
||||
|
public ResultBean taskReject(TemplateApplyTaskQuery query) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
String businessSid = query.getBusinessSid(); |
||||
|
LoanTemplate loanTemplate = fetchBySid(businessSid); |
||||
|
if (loanTemplate == null) { |
||||
|
return rb.setMsg("该申请不存在"); |
||||
|
} |
||||
|
String businessTaskId = loanTemplate.getTaskId(); |
||||
|
if (StringUtils.isNotBlank(businessTaskId)) { |
||||
|
if (businessTaskId.equals(query.getTaskId())) { |
||||
|
if (StringUtils.isBlank(query.getComment())) { |
||||
|
return rb.setMsg("请填写意见"); |
||||
|
} |
||||
|
if (StringUtils.isBlank(query.getUserSid())) { |
||||
|
return rb.setMsg("参数错误:userSid"); |
||||
|
} |
||||
|
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
||||
|
BeanUtil.copyProperties(query, flowTaskVo); |
||||
|
Map<String, Object> variables = new HashMap<>(); |
||||
|
Map<String, Object> appMap = new HashMap<>(); |
||||
|
appMap.put("sid", businessSid); |
||||
|
variables.put("app", appMap); |
||||
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.taskReject(flowTaskVo); |
||||
|
if (!resultBean.getSuccess()) { |
||||
|
return rb.setMsg(resultBean.getMsg()); |
||||
|
} |
||||
|
UpdateFlowFieldVo ufVo = resultBean.getData(); |
||||
|
Map<String, Object> map = BeanUtil.beanToMap(ufVo); |
||||
|
//更新业务中的流程相关的参数
|
||||
|
updateFlowFiled(map); |
||||
|
//极光推送
|
||||
|
loanTemplate = fetchBySid(businessSid); |
||||
|
MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); |
||||
|
MessageFlowVo messageFlowVo = new MessageFlowVo(); |
||||
|
BeanUtil.copyProperties(ufVo, messageFlowVo); |
||||
|
String procId = loanTemplate.getProcInstId(); |
||||
|
messageFlowVo.setProcInsId(procId); |
||||
|
messageFlowVo.setProcDefId(loanTemplate.getProcDefId()); |
||||
|
messageFlowableQuery.setUfVo(messageFlowVo); |
||||
|
messageFlowableQuery.setAppMap(appMap); |
||||
|
messageFlowableQuery.setBusinessSid(businessSid); |
||||
|
messageFlowableQuery.setModuleName("公司定制金融方案备案申请"); |
||||
|
ResultBean<List<LatestTaskVo>> listResultBean = flowTaskFeign.getLatestTasks(procId); |
||||
|
String nextName = listResultBean.getData().get(0).getName_(); |
||||
|
String nextNodeUserSids = listResultBean.getData().get(0).getASSIGNEE_(); |
||||
|
if ("发起申请".equals(nextName)) { |
||||
|
messageFlowableQuery.setMsgContent("您提交的" + messageFlowableQuery.getModuleName() + "已被驳回,请重新提交"); |
||||
|
} else { |
||||
|
messageFlowableQuery.setMsgContent(loanTemplate.getCreateByName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批"); |
||||
|
} |
||||
|
|
||||
|
messageFlowableQuery.setMsgTitle("公司定制金融方案备案"); |
||||
|
ResultBean<String> stringResultBean = messageFeign.pushMessage(messageFlowableQuery); |
||||
|
return rb.success(); |
||||
|
} |
||||
|
} |
||||
|
return rb.setMsg("操作失败!提交的数据不一致!"); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
public ResultBean breakProcess(TemplateApplyTaskQuery query) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
if (StringUtils.isBlank(query.getInstanceId())) { |
||||
|
return rb.setMsg("参数错误:instanceId"); |
||||
|
} |
||||
|
if (StringUtils.isBlank(query.getUserSid())) { |
||||
|
return rb.setMsg("参数错误:userSid"); |
||||
|
} |
||||
|
if (StringUtils.isBlank(query.getComment())) { |
||||
|
return rb.setMsg("请填写意见"); |
||||
|
} |
||||
|
LoanTemplate loanTemplate = fetchBySid(query.getBusinessSid()); |
||||
|
String businessTaskId = loanTemplate.getTaskId(); |
||||
|
if (StringUtils.isNotBlank(businessTaskId)) { |
||||
|
if (query.getUserSid().equals(loanTemplate.getCreateBySid())) { |
||||
|
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()); |
||||
|
} 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("操作失败!提交的数据不一致!"); |
||||
|
} |
||||
|
|
||||
|
public ResultBean revokeProcess(TemplateApplyTaskQuery query) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
if (StringUtils.isBlank(query.getUserSid())) { |
||||
|
return rb.setMsg("参数错误:userSid"); |
||||
|
} |
||||
|
LoanTemplate loanTemplate = fetchBySid(query.getBusinessSid()); |
||||
|
String businessTaskId = loanTemplate.getTaskId(); |
||||
|
if (StringUtils.isNotBlank(businessTaskId)) { |
||||
|
if (businessTaskId.equals(query.getTaskId())) { |
||||
|
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
||||
|
BeanUtil.copyProperties(query, flowTaskVo); |
||||
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.revokeProcess(flowTaskVo); |
||||
|
if (!resultBean.getSuccess()) { |
||||
|
return rb.setMsg(resultBean.getMsg()); |
||||
|
} |
||||
|
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); |
||||
|
return rb.success().setData(resultBean.getData()); |
||||
|
} |
||||
|
} |
||||
|
return rb.setMsg("操作失败,提交的数据不一致!"); |
||||
|
} |
||||
|
|
||||
|
public ResultBean<TemplateApplyVo> getTemplateApply(String sid) { |
||||
|
return null; |
||||
|
} |
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package com.yxt.anrui.riskcenter.biz.loantemplateinstall; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.yxt.anrui.riskcenter.api.loantemplateinstall.LoanTemplateInstall; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
@Mapper |
||||
|
public interface LoanTemplateInstallMapper extends BaseMapper<LoanTemplateInstall> { |
||||
|
} |
@ -0,0 +1,4 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.yxt.anrui.riskcenter.biz.loantemplateinstall.LoanTemplateInstallMapper"> |
||||
|
</mapper> |
@ -0,0 +1,14 @@ |
|||||
|
package com.yxt.anrui.riskcenter.biz.loantemplateinstall; |
||||
|
|
||||
|
import com.yxt.anrui.riskcenter.api.loantemplateinstall.LoanTemplateInstall; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
@Service |
||||
|
public class LoanTemplateInstallService extends MybatisBaseService<LoanTemplateInstallMapper, LoanTemplateInstall> { |
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package com.yxt.anrui.riskcenter.biz.loantemplatetrailer; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.yxt.anrui.riskcenter.api.loantemplatetrailer.LoanTemplateTrailer; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
@Mapper |
||||
|
public interface LoanTemplateTrailerMapper extends BaseMapper<LoanTemplateTrailer> { |
||||
|
} |
@ -0,0 +1,4 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.yxt.anrui.riskcenter.biz.loantemplatetrailer.LoanTemplateTrailerMapper"> |
||||
|
</mapper> |
@ -0,0 +1,14 @@ |
|||||
|
package com.yxt.anrui.riskcenter.biz.loantemplatetrailer; |
||||
|
|
||||
|
import com.yxt.anrui.riskcenter.api.loantemplatetrailer.LoanTemplateTrailer; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/7/19 |
||||
|
**/ |
||||
|
@Service |
||||
|
public class LoanTemplateTrailerService extends MybatisBaseService<LoanTemplateTrailerMapper, LoanTemplateTrailer> { |
||||
|
} |
Loading…
Reference in new issue