feat(purchase): 添加供应商确认邮件通知功能
- 在采购订单实体类中新增供应商邮箱字段 - 更新采购订单查询映射,添加供应商代码和邮箱信息 - 集成模板邮件工具类,实现供应商确认邮件发送 - 添加供应商确认邮件模板HTML文件 - 实现邮件发送逻辑,支持抄送特定供应商邮件 - 修复角色数据权限分配中的注释代码问题dev_1.0.2
parent
356fc1995e
commit
7d8ad420e4
|
|
@ -534,15 +534,15 @@ export default {
|
|||
/** 分配数据权限操作 */
|
||||
handleDataScope(row) {
|
||||
this.reset()
|
||||
// const deptTreeSelect = this.getDeptTree(row.roleId)
|
||||
const deptTreeSelect = this.getDeptTree(row.roleId)
|
||||
getRole(row.roleId).then(response => {
|
||||
this.form = response.data
|
||||
this.openDataScope = true
|
||||
// this.$nextTick(() => {
|
||||
// deptTreeSelect.then(res => {
|
||||
// this.$refs.dept.setCheckedKeys(res.checkedKeys)
|
||||
// })
|
||||
// })
|
||||
this.$nextTick(() => {
|
||||
deptTreeSelect.then(res => {
|
||||
this.$refs.dept.setCheckedKeys(res.checkedKeys)
|
||||
})
|
||||
})
|
||||
})
|
||||
this.title = "分配数据权限"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="renderer" content="webkit">
|
||||
</head>
|
||||
<style>
|
||||
tr td, th {
|
||||
text-align: center;
|
||||
border: 1px solid black;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div>
|
||||
<!-- <p>尊敬的用户:您好!</p>-->
|
||||
<p>您好,紫光汇智有新 PO 单【[[${purchaseNo}]]】送达,请进入紫光汇智 OMS 系统【进销存管理】供应商界面,确认订单,完成相关操作,并及时处理后续入库手续。</p>
|
||||
<p>如有疑问,可随时与我司沟通。联系人:徐心钰 15168396014</p>
|
||||
<div style="margin-top:50px">
|
||||
<img src="cid:signature" style="width: 200px; height: auto;"/>
|
||||
<p>紫光汇智信息技术有限公司</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -101,6 +101,7 @@ public class TemplateMailUtil {
|
|||
PAYABLE_REFUNDED_EMAIL("payableRefundedTemplate.html", "预付款恢复通知"),
|
||||
RECEIPT_EMAIL("receiptTemplate.html", "预收款变动通知"),
|
||||
RECEIPT_REFUNDED_EMAIL("receiptRefundedTemplate.html", "预收款恢复通知"),
|
||||
VENDOR_CONFIRM_EMAIL("vendorConfirmTemplate.html", "预收款恢复通知"),
|
||||
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -129,6 +129,7 @@ public class OmsPurchaseOrder extends BaseEntity
|
|||
private String taskId;
|
||||
private String productCode;
|
||||
private String productModel;
|
||||
private String vendorEmail;
|
||||
private Integer fileId;
|
||||
private OmsFileLog fileLog;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,11 +6,13 @@ import java.util.function.Function;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.ruoyi.common.enums.ApproveStatusEnum;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.common.utils.mail.TemplateMailUtil;
|
||||
import com.ruoyi.sip.domain.*;
|
||||
import com.ruoyi.sip.dto.inventory.OmsPurchaseOrderItemDto;
|
||||
import com.ruoyi.sip.flowable.domain.Todo;
|
||||
|
|
@ -406,7 +408,30 @@ public class OmsPurchaseOrderServiceImpl implements IOmsPurchaseOrderService, To
|
|||
@Override
|
||||
public int vendorConfirmStatus(OmsPurchaseOrder omsPurchaseOrder) {
|
||||
omsPurchaseOrder.setUpdateTime(DateUtils.getNowDate());
|
||||
return omsPurchaseOrderMapper.updateOmsPurchaseOrder(omsPurchaseOrder);
|
||||
|
||||
int i = omsPurchaseOrderMapper.updateOmsPurchaseOrder(omsPurchaseOrder);
|
||||
//发送邮件
|
||||
OmsPurchaseOrder existsOrder = omsPurchaseOrderMapper.selectOmsPurchaseOrderById(omsPurchaseOrder.getId());
|
||||
List<String> cssMailList = new ArrayList<>();
|
||||
//鼎盛需要抄送
|
||||
if ("P004".equals(existsOrder.getVendorCode())){
|
||||
// cssMailList.add("laiyk@dsipc.com.cn");
|
||||
cssMailList.add("chenhao2@unisinsight.com");
|
||||
}
|
||||
|
||||
|
||||
if (StringUtils.isEmpty(existsOrder.getVendorEmail())){
|
||||
log.info("发货邮件发送失败,收件人为空");
|
||||
return i;
|
||||
}
|
||||
String templateTile="紫光汇智云桌面-{}-采购单入库通知";
|
||||
Dict dict = Dict.create();
|
||||
dict.put("purchaseNo",existsOrder.getPurchaseNo());
|
||||
String title = StringUtils.format(templateTile, existsOrder.getPurchaseNo());
|
||||
TemplateMailUtil.sendTemplateMail(Collections.singletonList(existsOrder.getVendorEmail()),title,
|
||||
TemplateMailUtil.MailTemplate.VENDOR_CONFIRM_EMAIL, dict,cssMailList);
|
||||
|
||||
return i;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
, t1.purchaser_mobile, t1.purchaser_email, t1.warehouse_id, t1.pay_method, t1.owner_id, t1.owner_name, t1.remark, t1.total_amount,t1.flow_type
|
||||
, t1.status, t1.approve_status, t1.approve_time, t1.approve_node, t1.confirm_status, t1.create_time, t1.update_time, t1.del_flag,t1.version
|
||||
, t1.file_id
|
||||
,t2.vendor_name,t2.vendor_user,t2.vendor_phone,t3.warehouse_name
|
||||
,t2.vendor_name,t2.vendor_user,t2.vendor_code,t2.vendor_phone,t2.vendor_email,t3.warehouse_name
|
||||
from oms_purchase_order t1
|
||||
left join oms_vendor_info t2 on t1.vendor_id = t2.vendor_id
|
||||
left join oms_warehouse_info t3 on t1.warehouse_id = t3.id
|
||||
|
|
|
|||
Loading…
Reference in New Issue