Commit 93485df5 authored by 耿迪迪's avatar 耿迪迪

审批过程消息通知标记

parent f6e51aac
...@@ -85,7 +85,11 @@ public class TDebitCreditController extends BaseController ...@@ -85,7 +85,11 @@ public class TDebitCreditController extends BaseController
if(!itAccountService.checkAccountCanTrade(tDebitCredit.getLendDeptId(),tDebitCredit.getLittleTotal())){ if(!itAccountService.checkAccountCanTrade(tDebitCredit.getLendDeptId(),tDebitCredit.getLittleTotal())){
return AjaxResult.error("出借部门账户可用金额不足!"); return AjaxResult.error("出借部门账户可用金额不足!");
} }
return toAjax(tDebitCreditService.insertTDebitCredit(tDebitCredit)); int rows = tDebitCreditService.insertTDebitCredit(tDebitCredit);
if(rows > 0){
return AjaxResult.success(tDebitCredit);
}
return AjaxResult.error();
} }
/** /**
......
...@@ -144,6 +144,13 @@ public class SysNoticeController extends BaseController ...@@ -144,6 +144,13 @@ public class SysNoticeController extends BaseController
@PostMapping("/deleteNoticeByRelationId") @PostMapping("/deleteNoticeByRelationId")
public AjaxResult deleteNoticeByRelationId(@RequestBody SysNotice notice){ public AjaxResult deleteNoticeByRelationId(@RequestBody SysNotice notice){
int rows = noticeService.deleteNoticeByRelationId(notice.getRelationId());
webSocketServer.sendMessage(String.valueOf(notice.getCurrentUserId()));
return toAjax(rows);
}
@PostMapping("/noticeIsReadByRelationId")
public AjaxResult noticeIsReadByRelationId(@RequestBody SysNotice notice){
return toAjax(updateNoticeByRelationId(notice)); return toAjax(updateNoticeByRelationId(notice));
} }
...@@ -152,8 +159,14 @@ public class SysNoticeController extends BaseController ...@@ -152,8 +159,14 @@ public class SysNoticeController extends BaseController
SysNotice deleteNotice = new SysNotice(); SysNotice deleteNotice = new SysNotice();
deleteNotice.setStatus("1"); deleteNotice.setStatus("1");
deleteNotice.setRelationId(notice.getRelationId()); deleteNotice.setRelationId(notice.getRelationId());
return noticeService.updateNoticeByRelationId(deleteNotice); int rows = noticeService.updateNoticeByRelationId(deleteNotice);
String currentUserId = String.valueOf(notice.getCurrentUserId());
if(StringUtils.isNotEmpty(currentUserId)){
webSocketServer.sendMessage(currentUserId);
}
return rows;
} }
return 0; return 0;
} }
} }
...@@ -108,7 +108,11 @@ public class TPurchaseController extends BaseController ...@@ -108,7 +108,11 @@ public class TPurchaseController extends BaseController
if(!itAccountService.checkAccountCanTrade(user.getDeptId(),tPurchase.getTotal())){ if(!itAccountService.checkAccountCanTrade(user.getDeptId(),tPurchase.getTotal())){
return AjaxResult.error("账户可用金额不足!"); return AjaxResult.error("账户可用金额不足!");
} }
return toAjax(tPurchaseService.insertTPurchase(tPurchase)); int rows = tPurchaseService.insertTPurchase(tPurchase);
if(rows >0){
return AjaxResult.success(tPurchase);
}
return AjaxResult.error();
} }
/** /**
......
...@@ -58,6 +58,9 @@ public class SysNotice extends BaseEntity ...@@ -58,6 +58,9 @@ public class SysNotice extends BaseEntity
private boolean isStart; private boolean isStart;
/**用于消息刷新*/
private Long currentUserId;
public void setNoticeId(Integer noticeId) public void setNoticeId(Integer noticeId)
{ {
this.noticeId = noticeId; this.noticeId = noticeId;
...@@ -153,6 +156,14 @@ public class SysNotice extends BaseEntity ...@@ -153,6 +156,14 @@ public class SysNotice extends BaseEntity
isStart = start; isStart = start;
} }
public Long getCurrentUserId() {
return currentUserId;
}
public void setCurrentUserId(Long currentUserId) {
this.currentUserId = currentUserId;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
...@@ -64,4 +64,6 @@ public interface SysNoticeMapper ...@@ -64,4 +64,6 @@ public interface SysNoticeMapper
* @return * @return
*/ */
int updateNoticeByRelationId(SysNotice notice); int updateNoticeByRelationId(SysNotice notice);
int deleteNoticeByRelationId(Long relationId);
} }
...@@ -64,4 +64,6 @@ public interface ISysNoticeService ...@@ -64,4 +64,6 @@ public interface ISysNoticeService
* @return * @return
*/ */
int updateNoticeByRelationId(SysNotice notice); int updateNoticeByRelationId(SysNotice notice);
int deleteNoticeByRelationId(Long relationId);
} }
...@@ -99,4 +99,9 @@ public class SysNoticeServiceImpl implements ISysNoticeService ...@@ -99,4 +99,9 @@ public class SysNoticeServiceImpl implements ISysNoticeService
public int updateNoticeByRelationId(SysNotice notice){ public int updateNoticeByRelationId(SysNotice notice){
return noticeMapper.updateNoticeByRelationId(notice); return noticeMapper.updateNoticeByRelationId(notice);
} }
@Override
public int deleteNoticeByRelationId(Long relationId){
return noticeMapper.deleteNoticeByRelationId(relationId);
}
} }
...@@ -97,10 +97,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -97,10 +97,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where p.purchase_id = #{purchaseId} where p.purchase_id = #{purchaseId}
</select> </select>
<insert id="insertTPurchase" parameterType="TPurchase"> <insert id="insertTPurchase" parameterType="TPurchase" useGeneratedKeys="true" keyProperty="purchaseId">
insert into t_purchase insert into t_purchase
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="purchaseId != null">purchase_id,</if>
<if test="purchaseDeptId != null">purchase_dept_id,</if> <if test="purchaseDeptId != null">purchase_dept_id,</if>
<if test="purchaseType != null">purchase_type,</if> <if test="purchaseType != null">purchase_type,</if>
<if test="handledByUserId != null">handled_by_user_id,</if> <if test="handledByUserId != null">handled_by_user_id,</if>
...@@ -122,7 +121,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -122,7 +121,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="approvedTime != null">approved_time,</if> <if test="approvedTime != null">approved_time,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="purchaseId != null">#{purchaseId},</if>
<if test="purchaseDeptId != null">#{purchaseDeptId},</if> <if test="purchaseDeptId != null">#{purchaseDeptId},</if>
<if test="purchaseType != null">#{purchaseType},</if> <if test="purchaseType != null">#{purchaseType},</if>
<if test="handledByUserId != null">#{handledByUserId},</if> <if test="handledByUserId != null">#{handledByUserId},</if>
......
...@@ -122,4 +122,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -122,4 +122,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim> </trim>
where relation_id = #{relationId} AND status = '0' where relation_id = #{relationId} AND status = '0'
</update> </update>
<delete id="deleteNoticeByRelationId" parameterType="Long">
delete from sys_notice where relation_id = #{relationId}
</delete>
</mapper> </mapper>
\ No newline at end of file
...@@ -59,3 +59,11 @@ export function deleteNoticeByRelationId(data) { ...@@ -59,3 +59,11 @@ export function deleteNoticeByRelationId(data) {
data: data data: data
}) })
} }
export function noticeIsReadByRelationId(data) {
return request({
url: '/system/notice/noticeIsReadByRelationId',
method: 'post',
data: data
})
}
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
import confirm from "./Confirm"; import confirm from "./Confirm";
import calculate from "./Calculate"; import calculate from "./Calculate";
import repay from "./Repay" import repay from "./Repay"
import { sendNotice } from "@/api/system/notice"; import { sendNotice,noticeIsReadByRelationId } from "@/api/system/notice";
export default { export default {
name: "operator-button", name: "operator-button",
components:{ components:{
...@@ -82,7 +82,9 @@ ...@@ -82,7 +82,9 @@
if(this.debitData.debitStatus == "1"){ if(this.debitData.debitStatus == "1"){
settlementDebitCredit(this.$refs.currentCom.submitSuggestion()).then(res =>{ settlementDebitCredit(this.$refs.currentCom.submitSuggestion()).then(res =>{
if(this.$refs.currentCom.submitSuggestion().debitStatus == '4'){ if(this.$refs.currentCom.submitSuggestion().debitStatus == '4'){
sendNotice({noticeTitle:"您的借贷申请被驳回",noticeType:"1",noticeContent:"您的借贷申请被驳回",userId:this.debitInfo.operatorId}); sendNotice({noticeTitle:"您的借贷申请被驳回",noticeType:"1",noticeContent:"您的借贷申请被驳回",userId:this.debitInfo.operatorId,relationType:"4",relationId:this.debitInfo.debitId,currentUserId:this.$store.state.user.userId});
}else{
noticeIsReadByRelationId({relationId:this.debitInfo.debitId,currentUserId:this.$store.state.user.userId});
} }
this.dealResponse(res); this.dealResponse(res);
}) })
...@@ -97,7 +99,7 @@ ...@@ -97,7 +99,7 @@
} }
updateCredit(this.$refs.currentCom.submitSuggestion()).then(res =>{ updateCredit(this.$refs.currentCom.submitSuggestion()).then(res =>{
this.dealResponse(res); this.dealResponse(res);
sendNotice({noticeTitle:"您有新借贷待审核",noticeType:"1",noticeContent:"您有新借贷待审核",roles:"calculator"}) sendNotice({noticeTitle:"您有新借贷待审核",noticeType:"1",noticeContent:"您有新借贷待审核",roles:"calculator",relationType:"4",relationId:this.debitInfo.debitId,currentUserId:this.$store.state.user.userId})
}) })
}, },
......
...@@ -281,7 +281,7 @@ import { treeselect } from "@/api/system/dept"; ...@@ -281,7 +281,7 @@ import { treeselect } from "@/api/system/dept";
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import TableList from "./components/TableList"; import TableList from "./components/TableList";
import { sendNotice } from "@/api/system/notice"; import { sendNotice, deleteNoticeByRelationId } from "@/api/system/notice";
export default { export default {
name: "Credit", name: "Credit",
components: { components: {
...@@ -484,20 +484,20 @@ export default { ...@@ -484,20 +484,20 @@ export default {
this.form.debitDeptId = this.$store.state.user.deptId; this.form.debitDeptId = this.$store.state.user.deptId;
this.form.operatorId = this.$store.state.user.userId; this.form.operatorId = this.$store.state.user.userId;
this.form.dayRate = 0.08/360; this.form.dayRate = 0.08/360;
addCredit(this.form).then(response => { addCredit(this.form).then(res => {
this.msgSuccess("新增成功"); this.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
this.noticeNext(); this.noticeNext(res);
}); });
} }
} }
}); });
}, },
//通知下一个人 //通知下一个人
noticeNext(){ noticeNext(res){
sendNotice({noticeTitle:"您有新借贷待确认",noticeType:"1",noticeContent:"您有新借贷待确认", sendNotice({noticeTitle:"您有新借贷待确认",noticeType:"1",noticeContent:"您有新借贷待确认",
deptId:this.form.lendDeptId,roles:"deptLeader"}) deptId:this.form.lendDeptId,roles:"deptLeader",relationType:"4",relationId:res.data.debitId,isStart:true,currentUserId:this.$store.state.user.userId})
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
...@@ -509,6 +509,7 @@ export default { ...@@ -509,6 +509,7 @@ export default {
}).then(function() { }).then(function() {
return delCredit(debitIds); return delCredit(debitIds);
}).then(() => { }).then(() => {
deleteNoticeByRelationId({relationId:debitIds,currentUserId:this.$store.state.user.userId});
this.getList(); this.getList();
this.msgSuccess("删除成功"); this.msgSuccess("删除成功");
}).catch(() => {}); }).catch(() => {});
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
import calculate from "./Calculate"; import calculate from "./Calculate";
import confirm from "./Confirm"; import confirm from "./Confirm";
import purchaseDetail from "./PurchaseDetail"; import purchaseDetail from "./PurchaseDetail";
import { sendNotice } from "@/api/system/notice"; import { sendNotice, noticeIsReadByRelationId } from "@/api/system/notice";
export default { export default {
name: "operator-button", name: "operator-button",
components:{ components:{
...@@ -80,7 +80,10 @@ ...@@ -80,7 +80,10 @@
this.$emit("getList"); this.$emit("getList");
this.$message.success("审核成功!"); this.$message.success("审核成功!");
if(this.$refs.currentCom.submitSuggestion().purchaseStatus == '3'){ if(this.$refs.currentCom.submitSuggestion().purchaseStatus == '3'){
sendNotice({noticeTitle:"您的物品采购申请被驳回",noticeType:"1",noticeContent:"您的物品采购申请被驳回",userId:this.purchaseInfo.handledByUserId}); sendNotice({noticeTitle:"您的物品采购申请被驳回",noticeType:"1",noticeContent:"您的物品采购申请被驳回",userId:this.purchaseInfo.handledByUserId,relationType:"2",relationId:this.purchaseInfo.purchaseId,currentUserId:this.$store.state.user.userId});
}else{
console.log("sfsfdsfd------")
noticeIsReadByRelationId({relationId:this.purchaseInfo.purchaseId,currentUserId:this.$store.state.user.userId});
} }
}else{ }else{
this.$message.error("审核失败!"); this.$message.error("审核失败!");
...@@ -94,7 +97,7 @@ ...@@ -94,7 +97,7 @@
this.open = false; this.open = false;
this.$emit("getList"); this.$emit("getList");
this.$message.success("提交成功!"); this.$message.success("提交成功!");
sendNotice({noticeTitle:"您有新物品采购信息待审批",noticeType:"1",noticeContent:"您有新物品采购信息待审批",roles:"calculator"}) sendNotice({noticeTitle:"您有新物品采购信息待审批",noticeType:"1",noticeContent:"您有新物品采购信息待审批",roles:"calculator",relationType:"2",relationId:this.purchaseInfo.purchaseId,currentUserId:this.$store.state.user.userId})
}else{ }else{
this.$message.error("提交失败!"); this.$message.error("提交失败!");
} }
......
...@@ -285,7 +285,7 @@ ...@@ -285,7 +285,7 @@
import { listPurchase, getPurchase, delPurchase, addPurchase, updatePurchase, exportPurchase } from "@/api/transaction/purchase"; import { listPurchase, getPurchase, delPurchase, addPurchase, updatePurchase, exportPurchase } from "@/api/transaction/purchase";
import { selectTransactorByDeptId } from "@/api/system/user"; import { selectTransactorByDeptId } from "@/api/system/user";
import OperatorButton from "./components/OperatorButton"; import OperatorButton from "./components/OperatorButton";
import { sendNotice } from "@/api/system/notice"; import { sendNotice, deleteNoticeByRelationId } from "@/api/system/notice";
export default { export default {
name: "Purchase", name: "Purchase",
components: { components: {
...@@ -493,20 +493,20 @@ export default { ...@@ -493,20 +493,20 @@ export default {
this.getList(); this.getList();
}); });
} else { } else {
addPurchase(this.form).then(response => { addPurchase(this.form).then(res => {
this.msgSuccess("新增成功"); this.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
this.noticeNext(); this.noticeNext(res);
}); });
} }
} }
}); });
}, },
//通知下一个人 //通知下一个人
noticeNext(){ noticeNext(res){
sendNotice({noticeTitle:"您有新物品采购信息待确认",noticeType:"1",noticeContent:"您有新物品采购信息待确认", sendNotice({noticeTitle:"您有新物品采购信息待确认",noticeType:"1",noticeContent:"您有新物品采购信息待确认",
deptId:this.$store.state.user.deptId,roles:"deptLeader"}) deptId:this.$store.state.user.deptId,roles:"deptLeader",relationType:"2",relationId:res.data.purchaseId,isStart:true,currentUserId:this.$store.state.user.userId})
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
...@@ -518,6 +518,7 @@ export default { ...@@ -518,6 +518,7 @@ export default {
}).then(function() { }).then(function() {
return delPurchase(purchaseIds); return delPurchase(purchaseIds);
}).then(() => { }).then(() => {
deleteNoticeByRelationId({relationId:purchaseIds,currentUserId:this.$store.state.user.userId});
this.getList(); this.getList();
this.msgSuccess("删除成功"); this.msgSuccess("删除成功");
}).catch(() => {}); }).catch(() => {});
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
import calculate from "./Calculate"; import calculate from "./Calculate";
import confirm from "./Confirm"; import confirm from "./Confirm";
import purchaseDetail from "./PurchaseDetail"; import purchaseDetail from "./PurchaseDetail";
import { sendNotice } from "@/api/system/notice"; import { sendNotice, noticeIsReadByRelationId } from "@/api/system/notice";
export default { export default {
name: "operator-button", name: "operator-button",
components:{ components:{
...@@ -80,7 +80,9 @@ ...@@ -80,7 +80,9 @@
this.$emit("getList"); this.$emit("getList");
this.$message.success("审核成功!"); this.$message.success("审核成功!");
if(this.$refs.currentCom.submitSuggestion().purchaseStatus == '3'){ if(this.$refs.currentCom.submitSuggestion().purchaseStatus == '3'){
sendNotice({noticeTitle:"您的服务费用申请被驳回",noticeType:"1",noticeContent:"您的服务费用申请被驳回",userId:this.purchaseInfo.handledByUserId}); sendNotice({noticeTitle:"您的服务费用申请被驳回",noticeType:"1",noticeContent:"您的服务费用申请被驳回",userId:this.purchaseInfo.handledByUserId,relationType:"3",relationId:this.purchaseInfo.purchaseId,currentUserId:this.$store.state.user.userId});
}else {
noticeIsReadByRelationId({relationId:this.purchaseInfo.purchaseId,currentUserId:this.$store.state.user.userId});
} }
}else{ }else{
this.$message.error("审核失败!"); this.$message.error("审核失败!");
...@@ -94,7 +96,7 @@ ...@@ -94,7 +96,7 @@
this.open = false; this.open = false;
this.$emit("getList"); this.$emit("getList");
this.$message.success("提交成功!"); this.$message.success("提交成功!");
sendNotice({noticeTitle:"您有新服务费用信息待审批",noticeType:"1",noticeContent:"您有新服务费用信息待审批",roles:"calculator"}) sendNotice({noticeTitle:"您有新服务费用信息待审批",noticeType:"1",noticeContent:"您有新服务费用信息待审批",roles:"calculator",relationType:"3",relationId:this.purchaseInfo.purchaseId,currentUserId:this.$store.state.user.userId})
}else{ }else{
this.$message.error("提交失败!"); this.$message.error("提交失败!");
} }
......
...@@ -218,7 +218,7 @@ ...@@ -218,7 +218,7 @@
import { listPurchase, getPurchase, delPurchase, addPurchase, updatePurchase, exportPurchase } from "@/api/transaction/purchase"; import { listPurchase, getPurchase, delPurchase, addPurchase, updatePurchase, exportPurchase } from "@/api/transaction/purchase";
import { selectTransactorByDeptId } from "@/api/system/user"; import { selectTransactorByDeptId } from "@/api/system/user";
import OperatorButton from "./components/OperatorButton"; import OperatorButton from "./components/OperatorButton";
import { sendNotice } from "@/api/system/notice"; import { sendNotice, deleteNoticeByRelationId } from "@/api/system/notice";
export default { export default {
name: "Purchase", name: "Purchase",
components: { components: {
...@@ -380,20 +380,20 @@ export default { ...@@ -380,20 +380,20 @@ export default {
this.getList(); this.getList();
}); });
} else { } else {
addPurchase(this.form).then(response => { addPurchase(this.form).then(res => {
this.msgSuccess("新增成功"); this.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
this.noticeNext(); this.noticeNext(res);
}); });
} }
} }
}); });
}, },
//通知下一个人 //通知下一个人
noticeNext(){ noticeNext(res){
sendNotice({noticeTitle:"您有新服务费用信息待确认",noticeType:"1",noticeContent:"您有新服务费用信息待确认", sendNotice({noticeTitle:"您有新服务费用信息待确认",noticeType:"1",noticeContent:"您有新服务费用信息待确认",
deptId:this.$store.state.user.deptId,roles:"deptLeader"}) deptId:this.$store.state.user.deptId,roles:"deptLeader",relationType:"3",relationId:res.data.purchaseId,isStart:true,currentUserId:this.$store.state.user.userId})
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
...@@ -405,6 +405,7 @@ export default { ...@@ -405,6 +405,7 @@ export default {
}).then(function() { }).then(function() {
return delPurchase(purchaseIds); return delPurchase(purchaseIds);
}).then(() => { }).then(() => {
deleteNoticeByRelationId({relationId:purchaseIds,currentUserId:this.$store.state.user.userId});
this.getList(); this.getList();
this.msgSuccess("删除成功"); this.msgSuccess("删除成功");
}).catch(() => {}); }).catch(() => {});
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
import evaluate from "./Evaluate"; import evaluate from "./Evaluate";
import confirm from "./Confirm"; import confirm from "./Confirm";
import approval from "./Approval"; import approval from "./Approval";
import { sendNotice } from "@/api/system/notice"; import { sendNotice, noticeIsReadByRelationId } from "@/api/system/notice";
export default { export default {
name: "operator-button", name: "operator-button",
components:{ components:{
...@@ -115,7 +115,9 @@ ...@@ -115,7 +115,9 @@
this.$emit("getList"); this.$emit("getList");
this.$message.success("复核成功!"); this.$message.success("复核成功!");
if(this.$refs.currentCom.submitSuggestion().tradeStatus == "4"){ if(this.$refs.currentCom.submitSuggestion().tradeStatus == "4"){
sendNotice({noticeTitle:"您有新交易项目被驳回",noticeType:"1",noticeContent:"您有新交易项目被驳回",userId:this.tradeInfo.applyId,relationType:"1",relationId:this.tradeInfo.tradeId}) sendNotice({noticeTitle:"您有新交易项目被驳回",noticeType:"1",noticeContent:"您有新交易项目被驳回",userId:this.tradeInfo.applyId,relationType:"1",relationId:this.tradeInfo.tradeId,currentUserId:this.$store.state.user.userId})
}else{
noticeIsReadByRelationId({relationId:this.tradeInfo.tradeId,currentUserId:this.$store.state.user.userId});
} }
}else{ }else{
this.$message.error("复核失败!"); this.$message.error("复核失败!");
...@@ -131,12 +133,12 @@ ...@@ -131,12 +133,12 @@
that.$message.success("提交成功!"); that.$message.success("提交成功!");
if(this.$refs.currentCom.submitSuggestion().tradeStatus == "1"){ if(this.$refs.currentCom.submitSuggestion().tradeStatus == "1"){
sendNotice({noticeTitle:"您有新交易项目待确认",noticeType:"1",noticeContent:"您有新交易项目待确认", sendNotice({noticeTitle:"您有新交易项目待确认",noticeType:"1",noticeContent:"您有新交易项目待确认",
deptId:this.tradeInfo.tradeDeptId,roles:"deptLeader",relationType:"1",relationId:this.tradeInfo.tradeId}) deptId:this.tradeInfo.tradeDeptId,roles:"deptLeader",relationType:"1",relationId:this.tradeInfo.tradeId,currentUserId:this.$store.state.user.userId})
} }
if(this.$refs.currentCom.submitSuggestion().tradeStatus == "2"){ if(this.$refs.currentCom.submitSuggestion().tradeStatus == "2"){
sendNotice({noticeTitle:"您有新交易项目待确认",noticeType:"1",noticeContent:"您有新交易项目待确认", sendNotice({noticeTitle:"您有新交易项目待确认",noticeType:"1",noticeContent:"您有新交易项目待确认",
deptId:this.tradeInfo.applyDeptId,roles:"deptLeader",relationType:"1",relationId:this.tradeInfo.tradeId}) deptId:this.tradeInfo.applyDeptId,roles:"deptLeader",relationType:"1",relationId:this.tradeInfo.tradeId,currentUserId:this.$store.state.user.userId})
} }
}else{ }else{
......
...@@ -356,7 +356,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css"; ...@@ -356,7 +356,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import FileUpload from "@/components/MultipleFileUpload"; import FileUpload from "@/components/MultipleFileUpload";
import uploadfile from "@/assets/uploadfile.png"; import uploadfile from "@/assets/uploadfile.png";
import TableList from "./components/TableList"; import TableList from "./components/TableList";
import { sendNotice, deleteNoticeByRelationId } from "@/api/system/notice"; import { sendNotice, deleteNoticeByRelationId} from "@/api/system/notice";
export default { export default {
name: "Project", name: "Project",
components: { components: {
...@@ -581,7 +581,7 @@ export default { ...@@ -581,7 +581,7 @@ export default {
this.msgSuccess("新增成功"); this.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
sendNotice({noticeTitle:"您有新交易项目待评价",noticeType:"1",noticeContent:"您有新交易项目待评价",userId:this.form.tradeTransactor,relationType:"1",relationId:res.data.tradeId,isStart:true}) sendNotice({noticeTitle:"您有新交易项目待评价",noticeType:"1",noticeContent:"您有新交易项目待评价",userId:this.form.tradeTransactor,relationType:"1",relationId:res.data.tradeId,isStart:true,currentUserId:this.$store.state.user.userId})
}); });
} }
} }
...@@ -600,10 +600,10 @@ export default { ...@@ -600,10 +600,10 @@ export default {
} }
) )
.then(function () { .then(function () {
deleteNoticeByRelationId({relationId:tradeIds});
return delProject(tradeIds); return delProject(tradeIds);
}) })
.then(() => { .then(() => {
deleteNoticeByRelationId({relationId:tradeIds,currentUserId:this.$store.state.user.userId});
this.getList(); this.getList();
this.msgSuccess("删除成功"); this.msgSuccess("删除成功");
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment