
28 changed files with 351 additions and 85 deletions
@ -0,0 +1,62 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanvoucher; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author Fan |
|||
* @description |
|||
* @date 2023/12/19 11:16 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "一般凭证 数据传输对象", description = "一般凭证 数据传输对象") |
|||
public class RskGeneralVoucher { |
|||
|
|||
@ApiModelProperty("分公司编码") |
|||
@NotBlank(message = "分公司编码不能为空") |
|||
public String useOrgCode; |
|||
@ApiModelProperty("业务日期") |
|||
public String bussDate; |
|||
@ApiModelProperty("凭证明细") |
|||
public List<RskGeneralVoucher.GeneralVoucherDetail> voucherDetails; |
|||
|
|||
@Data |
|||
public static class GeneralVoucherDetail { |
|||
public String timeFlag; //应用于资金占用费计提凭证摘要标识 0代表上月 1代表本月
|
|||
public String type; |
|||
@ApiModelProperty("场景编码") |
|||
public String sceneCode; |
|||
@ApiModelProperty("资方简称") |
|||
@NotBlank(message = "资方简称不能为空") |
|||
public String bankName; |
|||
@ApiModelProperty("数据日期") |
|||
public Date dataTime; |
|||
@ApiModelProperty("部门编码") |
|||
@NotBlank(message = "部门编码不能为空") |
|||
public String deptCode; |
|||
@ApiModelProperty("部门名称") |
|||
public String deptName; |
|||
@ApiModelProperty("客户编码") |
|||
@NotBlank(message = "客户编码不能为空") |
|||
public String customerCode; |
|||
@ApiModelProperty("客户名称") |
|||
public String customerName; |
|||
@ApiModelProperty("金额") |
|||
@NotBlank(message = "金额不能为空") |
|||
public BigDecimal amount; |
|||
@ApiModelProperty("核算维度厂商(供应商)") |
|||
public String manufacturer; |
|||
@ApiModelProperty("核算维度物料") |
|||
public String material; |
|||
@ApiModelProperty("备注") |
|||
public String remarks; |
|||
@ApiModelProperty("采购系统sid") |
|||
public String purchaseSystemSid; |
|||
} |
|||
} |
@ -0,0 +1,69 @@ |
|||
import Vue from 'vue' |
|||
|
|||
Vue.directive('dialogDrag', { |
|||
bind: (el) => { |
|||
// 获取弹框标题区域DOM节点
|
|||
const headerDOM = el.querySelector('.el-dialog__header') |
|||
// 修改鼠标图标样式
|
|||
headerDOM.style.curser = 'move' |
|||
// 禁止拖拽时选中标题文本内容
|
|||
headerDOM.style.userSelect = 'none' |
|||
// 获取弹框区域DOM节点
|
|||
const dialogDOM = el.querySelector('.el-dialog') |
|||
let isDown = false, // 是否按下
|
|||
// 鼠标按下时坐标位置
|
|||
clientX = 0, |
|||
clientY = 0, |
|||
// 按下时弹框位置
|
|||
dialogLeft = 0, |
|||
dialogTop = 0 |
|||
// 定义函数判断当前是否在可见范围内
|
|||
function boundingRange() { |
|||
const bounding = dialogDOM.getBoundingClientRect() |
|||
return { |
|||
top: bounding.top >= 0, // 表示顶部在可见范围内
|
|||
left: bounding.left >= 0, // 表示左侧在可见范围内
|
|||
right: bounding.left < window.innerWidth - bounding.width, // 表示右侧在制定范围内
|
|||
bottom: bounding.top < window.innerHeight - bounding.height // 表示底部在制定范围内
|
|||
} |
|||
} |
|||
function update(e) { |
|||
// 获取当前鼠标按钮位置坐标
|
|||
clientX = e.clientX |
|||
clientY = e.clientY |
|||
// 获取弹框位置
|
|||
dialogLeft = isNaN(parseFloat(dialogDOM.style.left)) ? 0 : parseFloat(dialogDOM.style.left) |
|||
dialogTop = isNaN(parseFloat(dialogDOM.style.top)) ? 0 : parseFloat(dialogDOM.style.top) |
|||
} |
|||
// 监听鼠标按下事件
|
|||
headerDOM.onmousedown = e => { |
|||
isDown = true |
|||
update(e) |
|||
} |
|||
// 监听鼠标移动事件
|
|||
headerDOM.onmousemove = e => { |
|||
// 不按下时执行移动操作
|
|||
if (isDown) { |
|||
// 获取DOM边界范围
|
|||
const range = boundingRange() |
|||
// 获取当前
|
|||
const distX = e.clientX - clientX |
|||
const distY = e.clientY - clientY |
|||
// 判断左侧或右侧是否可移动
|
|||
if ((range.left && distX < 0) || range.right && distX > 0) { |
|||
dialogDOM.style.left = (dialogLeft + distX) + 'px' |
|||
} |
|||
if ((range.top && distY < 0) || range.bottom && distY > 0) { |
|||
dialogDOM.style.top = (dialogTop + distY) + 'px' |
|||
} |
|||
update(e) |
|||
} |
|||
} |
|||
headerDOM.onmouseup = e => { |
|||
isDown = false |
|||
} |
|||
window.onmouseup = () => { |
|||
isDown = false |
|||
} |
|||
} |
|||
}) |
Loading…
Reference in new issue